From dd397ec7521f77d1a7a4cd8468f90d00725dc491 Mon Sep 17 00:00:00 2001 From: lindaandersson Date: Thu, 20 Feb 2014 10:13:01 +0100 Subject: [PATCH] GameClient set onMoveFunc for all objects --- Code/Game/GameLogic/Object.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/Game/GameLogic/Object.cpp b/Code/Game/GameLogic/Object.cpp index 1f43263b..22273b7e 100644 --- a/Code/Game/GameLogic/Object.cpp +++ b/Code/Game/GameLogic/Object.cpp @@ -30,6 +30,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody, void (*collisionFuncAfte this->objectID = objectID; this->extraDamageOnCollision = 0; this->rigidBody->SetCustomTag(this); + this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_Move)((Game*)&Game::Instance())->onMoveFnc); } @@ -41,6 +42,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody , Oyster::Physics::ICusto this->objectID = objectID; this->extraDamageOnCollision = 0; this->rigidBody->SetCustomTag(this); + this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_Move)((Game*)&Game::Instance())->onMoveFnc); } Object::~Object(void)