Updates for objects
This commit is contained in:
parent
ba0d6ca73a
commit
e5e99924d9
|
@ -483,7 +483,7 @@ void GameState::Protocol( ObjPos* pos )
|
|||
if(privData->object[i]->GetId() == pos->object_ID)
|
||||
{
|
||||
privData->object[i]->setPos(world);
|
||||
Oyster::Math::Float3 position = Oyster::Math::Float3(0, 605, 15);
|
||||
Oyster::Math::Float3 position = Oyster::Math::Float3(0, 605, -15);
|
||||
if(pos->object_ID == myId) // playerobj
|
||||
{
|
||||
//printf("Move message recieved!");
|
||||
|
|
|
@ -105,7 +105,10 @@ bool Game::NewFrame()
|
|||
if(this->players[i]->player) this->players[i]->player->EndFrame();
|
||||
gameInstance.onMoveFnc(this->players[i]);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < this->level->level->dynamicObjects.Size(); i++)
|
||||
{
|
||||
gameInstance.onMoveFnc(this->level->level->dynamicObjects[i]);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
|
|
|
@ -13,6 +13,8 @@ Level::Level(void)
|
|||
}
|
||||
Level::~Level(void)
|
||||
{
|
||||
delete this->levelObj;
|
||||
this->levelObj = NULL;
|
||||
}
|
||||
|
||||
void Level::InitiateLevel(std::string levelPath)
|
||||
|
@ -70,7 +72,7 @@ void Level::InitiateLevel(float radius)
|
|||
int offset = 0;
|
||||
for(int i =0; i< nrOfBoxex; i ++)
|
||||
{
|
||||
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 605 + i*5, -10), 5);
|
||||
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 605 + i*5, 10), 5);
|
||||
|
||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||
this->dynamicObjects[i]->objectID = idCount++;
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace GameLogic
|
|||
static void PhysicsOnMoveLevel(const Oyster::Physics::ICustomBody *object);
|
||||
|
||||
|
||||
private:
|
||||
//private:
|
||||
TeamManager teamManager;
|
||||
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<StaticObject>> staticObjects;
|
||||
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<DynamicObject>> dynamicObjects;
|
||||
|
|
Loading…
Reference in New Issue