GameClient now objects say to client that they have moved!
This commit is contained in:
parent
9082666eba
commit
e6cd1f1e5f
|
@ -300,6 +300,7 @@ bool Level::InitiateLevel(std::wstring levelPath)
|
|||
Object* dynamicGameObj = CreateGameObj(dynamicObjData, rigidBody_Dynamic);
|
||||
if (dynamicGameObj != NULL)
|
||||
{
|
||||
dynamicGameObj->GetRigidBody()->SetSubscription(Level::PhysicsOnMoveLevel);
|
||||
this->dynamicObjects.Push((DynamicObject*)dynamicGameObj);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,7 +41,6 @@ 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)
|
||||
|
|
|
@ -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 */
|
||||
linearVelocity *= 0.2f;
|
||||
|
|
Loading…
Reference in New Issue