Bugfix: client didn't show the speed of the karts correctly.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2251 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
1c97237940
commit
a4ce04aaf7
@ -880,8 +880,10 @@ void Kart::updatePhysics (float dt)
|
|||||||
m_vehicle->setSteeringValue(0.0f, 1);
|
m_vehicle->setSteeringValue(0.0f, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//store current velocity
|
// Only compute the current speed if this is not the client. On a client the
|
||||||
m_speed = getVehicle()->getRigidBody()->getLinearVelocity().length();
|
// speed is actually received from the server.
|
||||||
|
if(network_manager->getMode()!=NetworkManager::NW_CLIENT)
|
||||||
|
m_speed = getVehicle()->getRigidBody()->getLinearVelocity().length();
|
||||||
|
|
||||||
// calculate direction of m_speed
|
// calculate direction of m_speed
|
||||||
const btTransform& chassisTrans = getVehicle()->getChassisWorldTransform();
|
const btTransform& chassisTrans = getVehicle()->getChassisWorldTransform();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user