GL - will merge with physics
This commit is contained in:
parent
fa7f400c71
commit
57c230d458
|
@ -100,6 +100,18 @@ namespace DanBias
|
||||||
((Client::GameState*)gameClientState)->Protocol(&protocolData);
|
((Client::GameState*)gameClientState)->Protocol(&protocolData);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case protocol_Lobby_Start:
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
if(dynamic_cast<Client::LobbyState*>(gameClientState))
|
||||||
|
{
|
||||||
|
gameClientState->Release();
|
||||||
|
delete gameClientState;
|
||||||
|
gameClientState = new Client::GameState();
|
||||||
|
gameClientState->Init(m_data->recieverObj);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
bool Release();
|
bool Release();
|
||||||
void Protocol(ProtocolStruct* protocol)override;
|
void Protocol(ProtocolStruct* protocol)override;
|
||||||
void PlayerJoinProtocol(PlayerName* name);
|
void PlayerJoinProtocol(PlayerName* name);
|
||||||
|
void GameStarted();
|
||||||
|
|
||||||
};};};
|
};};};
|
||||||
#endif // ! DANBIAS_CLIENT_GAMECLIENTSTATE_H
|
#endif // ! DANBIAS_CLIENT_GAMECLIENTSTATE_H
|
||||||
|
|
|
@ -109,7 +109,7 @@ GameClientState::ClientState LoginState::Update(float deltaTime, InputClass* Key
|
||||||
if( KeyInput->IsKeyPressed(DIK_J))
|
if( KeyInput->IsKeyPressed(DIK_J))
|
||||||
{
|
{
|
||||||
// game ip
|
// game ip
|
||||||
nwClient->Connect(15151, "194.47.150.56");
|
nwClient->Connect(15151, "193.11.184.109");
|
||||||
|
|
||||||
if (!nwClient->IsConnected())
|
if (!nwClient->IsConnected())
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,12 +87,6 @@ using namespace GameLogic;
|
||||||
Oyster::Math::Float3 pushForce = Oyster::Math::Float4(1,0,0) * (500);
|
Oyster::Math::Float3 pushForce = Oyster::Math::Float4(1,0,0) * (500);
|
||||||
Oyster::Physics::ICustomBody::State state;
|
Oyster::Physics::ICustomBody::State state;
|
||||||
Object *realObj = (Object*)obj->GetCustomTag();
|
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)
|
if(realObj->GetObjectType() == OBJECT_TYPE_PLAYER || realObj->GetObjectType() == OBJECT_TYPE_WORLD)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -44,7 +44,7 @@ void Level::InitiateLevel(float radius)
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(0,320,0,0);
|
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(0,320,0,0);
|
||||||
sbDesc_TestBox.ignoreGravity = false;
|
sbDesc_TestBox.ignoreGravity = false;
|
||||||
sbDesc_TestBox.mass = 50;
|
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();
|
ICustomBody* rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
||||||
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
||||||
|
|
Loading…
Reference in New Issue