From 57c230d45848c3233ffc72dd23b7bc9dd0cf0009 Mon Sep 17 00:00:00 2001 From: lindaandersson Date: Fri, 31 Jan 2014 13:56:22 +0100 Subject: [PATCH] GL - will merge with physics --- Code/Game/DanBiasGame/GameClientRecieverFunc.h | 12 ++++++++++++ Code/Game/DanBiasGame/GameClientState/LobbyState.h | 1 + Code/Game/DanBiasGame/GameClientState/LoginState.cpp | 2 +- Code/Game/GameLogic/CollisionManager.cpp | 6 ------ Code/Game/GameLogic/Level.cpp | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Code/Game/DanBiasGame/GameClientRecieverFunc.h b/Code/Game/DanBiasGame/GameClientRecieverFunc.h index 36b831a0..ef65e46a 100644 --- a/Code/Game/DanBiasGame/GameClientRecieverFunc.h +++ b/Code/Game/DanBiasGame/GameClientRecieverFunc.h @@ -100,6 +100,18 @@ namespace DanBias ((Client::GameState*)gameClientState)->Protocol(&protocolData); } break; + case protocol_Lobby_Start: + { + /* + if(dynamic_cast(gameClientState)) + { + gameClientState->Release(); + delete gameClientState; + gameClientState = new Client::GameState(); + gameClientState->Init(m_data->recieverObj); + }*/ + } + break; default: break; diff --git a/Code/Game/DanBiasGame/GameClientState/LobbyState.h b/Code/Game/DanBiasGame/GameClientState/LobbyState.h index 057fc850..6a8d9772 100644 --- a/Code/Game/DanBiasGame/GameClientState/LobbyState.h +++ b/Code/Game/DanBiasGame/GameClientState/LobbyState.h @@ -36,6 +36,7 @@ public: bool Release(); void Protocol(ProtocolStruct* protocol)override; void PlayerJoinProtocol(PlayerName* name); + void GameStarted(); };};}; #endif // ! DANBIAS_CLIENT_GAMECLIENTSTATE_H diff --git a/Code/Game/DanBiasGame/GameClientState/LoginState.cpp b/Code/Game/DanBiasGame/GameClientState/LoginState.cpp index cd1e4663..4d1079bc 100644 --- a/Code/Game/DanBiasGame/GameClientState/LoginState.cpp +++ b/Code/Game/DanBiasGame/GameClientState/LoginState.cpp @@ -109,7 +109,7 @@ GameClientState::ClientState LoginState::Update(float deltaTime, InputClass* Key if( KeyInput->IsKeyPressed(DIK_J)) { // game ip - nwClient->Connect(15151, "194.47.150.56"); + nwClient->Connect(15151, "193.11.184.109"); if (!nwClient->IsConnected()) { diff --git a/Code/Game/GameLogic/CollisionManager.cpp b/Code/Game/GameLogic/CollisionManager.cpp index 196aed09..f343720e 100644 --- a/Code/Game/GameLogic/CollisionManager.cpp +++ b/Code/Game/GameLogic/CollisionManager.cpp @@ -87,12 +87,6 @@ using namespace GameLogic; Oyster::Math::Float3 pushForce = Oyster::Math::Float4(1,0,0) * (500); Oyster::Physics::ICustomBody::State state; Object *realObj = (Object*)obj->GetCustomTag(); - if(realObj->GetObjectType() == OBJECT_TYPE_BOX) - { - state = obj->GetState(); - state.SetOrientation(Oyster::Math::Float3(1,0.5,1),Oyster::Math::Float3(1,0.5,1)); - obj->SetState(state); - } if(realObj->GetObjectType() == OBJECT_TYPE_PLAYER || realObj->GetObjectType() == OBJECT_TYPE_WORLD) return; diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp index e09f9bb0..e95f95c6 100644 --- a/Code/Game/GameLogic/Level.cpp +++ b/Code/Game/GameLogic/Level.cpp @@ -44,7 +44,7 @@ void Level::InitiateLevel(float radius) sbDesc_TestBox.centerPosition = Oyster::Math::Float4(0,320,0,0); sbDesc_TestBox.ignoreGravity = false; sbDesc_TestBox.mass = 50; - sbDesc_TestBox.size = Oyster::Math::Float4(1,1,1,0); + sbDesc_TestBox.size = Oyster::Math::Float4(4,4,4,0); ICustomBody* rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release(); rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);