GL - fixed compile errors
This commit is contained in:
parent
59697bfcea
commit
5defe7c0f7
|
@ -23,13 +23,13 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
|
||||||
{
|
{
|
||||||
case ObjectSpecialType_None:
|
case ObjectSpecialType_None:
|
||||||
{
|
{
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Sky:
|
case ObjectSpecialType_Sky:
|
||||||
{
|
{
|
||||||
float skySize = ((SkyAttributes*)obj)->skySize;
|
float skySize = ((SkyAttributes*)obj)->skySize;
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_World:
|
case ObjectSpecialType_World:
|
||||||
|
@ -39,28 +39,28 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
|
||||||
|
|
||||||
float worldSize = ((WorldAttributes*)obj)->worldSize;
|
float worldSize = ((WorldAttributes*)obj)->worldSize;
|
||||||
float atmosphereSize = ((WorldAttributes*)obj)->atmoSphereSize;
|
float atmosphereSize = ((WorldAttributes*)obj)->atmoSphereSize;
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Building:
|
case ObjectSpecialType_Building:
|
||||||
{
|
{
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
case ObjectSpecialType_Stone:
|
case ObjectSpecialType_Stone:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_StandarsBox:
|
case ObjectSpecialType_StandardBox:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_RedExplosiveBox:
|
case ObjectSpecialType_RedExplosiveBox:
|
||||||
{
|
{
|
||||||
int dmg = 50;
|
int dmg = 50;
|
||||||
//gameObj = new ExplosiveBox(rigidBody, ObjectSpecialType_RedExplosiveBox);
|
//gameObj = new ExplosiveBox(rigidBody, ObjectSpecialType_RedExplosiveBox);
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//case ObjectSpecialType_BlueExplosiveBox:
|
//case ObjectSpecialType_BlueExplosiveBox:
|
||||||
|
@ -69,24 +69,24 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
|
||||||
// break;
|
// break;
|
||||||
case ObjectSpecialType_SpikeBox:
|
case ObjectSpecialType_SpikeBox:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Spike:
|
case ObjectSpecialType_Spike:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_CrystalFormation:
|
case ObjectSpecialType_CrystalFormation:
|
||||||
{
|
{
|
||||||
int dmg = 50;
|
int dmg = 50;
|
||||||
//gameObj = new Crystal(rigidBody);
|
//gameObj = new Crystal(rigidBody);
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_CrystalShard:
|
case ObjectSpecialType_CrystalShard:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_JumpPad:
|
case ObjectSpecialType_JumpPad:
|
||||||
|
@ -94,33 +94,33 @@ Object* Level::createGameObj(ObjectHeader* obj, ICustomBody* rigidBody)
|
||||||
float power = ((JumpPadAttributes*)obj)->power;
|
float power = ((JumpPadAttributes*)obj)->power;
|
||||||
Oyster::Math::Float3 dir = ((JumpPadAttributes*)obj)->direction;
|
Oyster::Math::Float3 dir = ((JumpPadAttributes*)obj)->direction;
|
||||||
//gameObj = JumpPad(rigidBody, );
|
//gameObj = JumpPad(rigidBody, );
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Portal:
|
case ObjectSpecialType_Portal:
|
||||||
{
|
{
|
||||||
Oyster::Math::Float3 destination = ((PortalAttributes*)obj)->destination;
|
Oyster::Math::Float3 destination = ((PortalAttributes*)obj)->destination;
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_SpawnPoint:
|
case ObjectSpecialType_SpawnPoint:
|
||||||
{
|
{
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Player:
|
case ObjectSpecialType_Player:
|
||||||
{
|
{
|
||||||
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new DynamicObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ObjectSpecialType_Generic:
|
case ObjectSpecialType_Generic:
|
||||||
{
|
{
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID);
|
gameObj = new StaticObject(rigidBody, Object::DefaultCollisionAfter, (ObjectSpecialType)obj->specialTypeID,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,9 @@ Portal::Portal(void)
|
||||||
this->portalExit = Float3(0,0,0);
|
this->portalExit = Float3(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
Portal::Portal(Oyster::Physics::ICustomBody *rigidBody, void (*collisionFuncAfter)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type, Oyster::Math::Float3 portalExit)
|
|
||||||
:StaticObject(rigidBody, collisionFuncAfter, type)
|
|
||||||
=======
|
|
||||||
Portal::Portal(Oyster::Physics::ICustomBody *rigidBody, void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type,int objectID ,Oyster::Math::Float3 portalExit)
|
Portal::Portal(Oyster::Physics::ICustomBody *rigidBody, void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type,int objectID ,Oyster::Math::Float3 portalExit)
|
||||||
:StaticObject(rigidBody, EventOnCollision, type, objectID)
|
:StaticObject(rigidBody, EventOnCollision, type, objectID)
|
||||||
>>>>>>> GL - fixed constructors to ease creation of objects, also fixed weapon crash on destruction
|
|
||||||
{
|
{
|
||||||
this->portalExit = portalExit;
|
this->portalExit = portalExit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue