Fixed ironical situation : I wrote stupid code; Joerg's compiler produced warnings for said stupid code;de; Joerg adds cast to make compiler accept stupid code instead of fixing stupid code ;) Hopefully the code makes more sense now
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6479 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
3b6b6ad828
commit
c68d8cebb2
@ -1217,17 +1217,17 @@ void Kart::updatePhysics(float dt)
|
||||
{
|
||||
btVector3 velocity = m_body->getLinearVelocity();
|
||||
|
||||
const int x = (int)velocity.x();
|
||||
const float x = velocity.x();
|
||||
if (x > 0.2f) velocity.setX(x - 0.2f);
|
||||
else if (x < -0.2f) velocity.setX(x + 0.2f);
|
||||
else velocity.setX(0);
|
||||
|
||||
const int y = (int)velocity.y();
|
||||
const float y = velocity.y();
|
||||
if (y > 0.2f) velocity.setY(y - 0.2f);
|
||||
else if (y < -0.2f) velocity.setY(y + 0.2f);
|
||||
else velocity.setY(0);
|
||||
|
||||
const int z = (int)velocity.z();
|
||||
const float z = velocity.z();
|
||||
if (z > 0.2f) velocity.setZ(z - 0.2f);
|
||||
else if (z < -0.2f) velocity.setZ(z + 0.2f);
|
||||
else velocity.setZ(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user