diff --git a/Code/Game/DanBiasServer/GameSession/GameSession.h b/Code/Game/DanBiasServer/GameSession/GameSession.h index aee9b29d..0e64a821 100644 --- a/Code/Game/DanBiasServer/GameSession/GameSession.h +++ b/Code/Game/DanBiasServer/GameSession/GameSession.h @@ -30,7 +30,7 @@ namespace DanBias NetworkSession* owner; Utility::DynamicMemory::DynamicArray> clients; }; - + public: GameSession(); virtual~GameSession(); diff --git a/Code/Game/DanBiasServer/GameSession/GameSession_Events.cpp b/Code/Game/DanBiasServer/GameSession/GameSession_Events.cpp index 1c1e5127..d7cb2f39 100644 --- a/Code/Game/DanBiasServer/GameSession/GameSession_Events.cpp +++ b/Code/Game/DanBiasServer/GameSession/GameSession_Events.cpp @@ -113,8 +113,10 @@ namespace DanBias void GameSession::ObjectMove(GameLogic::IObjectData* movedObject) { - movedObject->GetID(); - movedObject->GetOrientation(); + /*int id= movedObject->GetID(); + Oyster::Math::Float4x4 world = movedObject->GetOrientation(); + Protocol_ObjectPosition p(world, 2); + Send(p.GetProtocol());*/ } diff --git a/Code/Game/GameLogic/CollisionManager.cpp b/Code/Game/GameLogic/CollisionManager.cpp index 41908167..887d1f13 100644 --- a/Code/Game/GameLogic/CollisionManager.cpp +++ b/Code/Game/GameLogic/CollisionManager.cpp @@ -73,5 +73,9 @@ using namespace GameLogic; void AttatchmentMassDriver::ForcePushAction(Oyster::Physics::ICustomBody *obj) { Oyster::Math::Float4 pushForce = Oyster::Math::Float4(1,0,0,0) * (500); - ((Object*)obj->GetCustomTag())->ApplyLinearImpulse(pushForce); + Oyster::Physics::ICustomBody::State state; + state = obj->GetState(); + state.ApplyLinearImpulse(pushForce); + obj->SetState(state); + //((Object*)obj->GetCustomTag())->ApplyLinearImpulse(pushForce); } diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp index 0e99d160..406b81e9 100644 --- a/Code/Game/GameLogic/Level.cpp +++ b/Code/Game/GameLogic/Level.cpp @@ -39,18 +39,18 @@ void Level::InitiateLevel(float radius) levelObj = new StaticObject(rigidBody, LevelCollision, OBJECT_TYPE::OBJECT_TYPE_WORLD); - API::SphericalBodyDescription sbDesc_TestBox; - sbDesc.centerPosition = Oyster::Math::Float4(3,15,0,0); - sbDesc.ignoreGravity = true; - sbDesc.radius = 8; //radius; - sbDesc.mass = 10e12f; + API::SimpleBodyDescription sbDesc_TestBox; + sbDesc_TestBox.centerPosition = Oyster::Math::Float4(3,15,0,0); + sbDesc_TestBox.ignoreGravity = false; + sbDesc_TestBox.mass = 10; + sbDesc_TestBox.size = Oyster::Math::Float4(2,2,2,0); //sbDesc.mass = 0; //10^16 ICustomBody* rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release(); - DynamicObject *testBox = new DynamicObject(rigidBody_TestBox,LevelCollision,OBJECT_TYPE::OBJECT_TYPE_BOX); + testBox = new DynamicObject(rigidBody_TestBox,LevelCollision,OBJECT_TYPE::OBJECT_TYPE_BOX); /*API::Gravity gravityWell; diff --git a/Code/Game/GameLogic/Level.h b/Code/Game/GameLogic/Level.h index 6aa54002..7d280761 100644 --- a/Code/Game/GameLogic/Level.h +++ b/Code/Game/GameLogic/Level.h @@ -66,6 +66,7 @@ namespace GameLogic GameMode gameMode; Utility::DynamicMemory::SmartPointer rigidBodyLevel; StaticObject *levelObj; + DynamicObject *testBox; };