Merge branch 'GameClient' of https://github.com/dean11/Danbias into GameClient

This commit is contained in:
Pontus Fransson 2014-02-20 11:01:38 +01:00
commit a4de2ddbe2
3 changed files with 4 additions and 2 deletions

View File

@ -79,9 +79,10 @@ GameClientState::ClientState MainState::Update( float deltaTime )
{ {
bool test = this->privData->input->IsMousePressed(); bool test = this->privData->input->IsMousePressed();
if(test) if(test)
{ { // HACK: debug trap still in use?
int i = 0; int i = 0;
}; };
this->privData->input->GetMousePos( mouseState.x, mouseState.y ); this->privData->input->GetMousePos( mouseState.x, mouseState.y );
mouseState.mouseButtonPressed = this->privData->input->IsMousePressed(); mouseState.mouseButtonPressed = this->privData->input->IsMousePressed();
} }

View File

@ -300,6 +300,7 @@ bool Level::InitiateLevel(std::wstring levelPath)
Object* dynamicGameObj = CreateGameObj(dynamicObjData, rigidBody_Dynamic); Object* dynamicGameObj = CreateGameObj(dynamicObjData, rigidBody_Dynamic);
if (dynamicGameObj != NULL) if (dynamicGameObj != NULL)
{ {
dynamicGameObj->GetRigidBody()->SetSubscription(Level::PhysicsOnMoveLevel);
this->dynamicObjects.Push((DynamicObject*)dynamicGameObj); this->dynamicObjects.Push((DynamicObject*)dynamicGameObj);
} }
} }

View File

@ -127,7 +127,7 @@ void Player::BeginFrame()
} }
if (key_forward <= 0.001 && key_backward <= 0.001 && key_strafeRight <= 0.001 && key_strafeLeft <= 0.001 && key_jump <= 0.001 ) //&& this->rigidBody->GetLambda() < 0.7f) if (key_forward <= 0.001 && key_backward <= 0.001 && key_strafeRight <= 0.001 && key_strafeLeft <= 0.001 && key_jump <= 0.001 && this->rigidBody->GetLambda() < 0.7f)
{ {
/* Dampen when on the ground and not being moved by the player */ /* Dampen when on the ground and not being moved by the player */
linearVelocity *= 0.2f; linearVelocity *= 0.2f;