Bugfix: moving physical objects would keep their speed when
a restart is done - so they would be placed at their start position, but still rotating/moving. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1459 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b9bfb128e4
commit
0f6d732e68
@ -203,6 +203,8 @@ void MovingPhysics::update(float dt)
|
|||||||
void MovingPhysics::reset()
|
void MovingPhysics::reset()
|
||||||
{
|
{
|
||||||
m_body->setCenterOfMassTransform(m_init_pos);
|
m_body->setCenterOfMassTransform(m_init_pos);
|
||||||
|
m_body->setAngularVelocity(btVector3(0,0,0));
|
||||||
|
m_body->setLinearVelocity(btVector3(0,0,0));
|
||||||
} // reset
|
} // reset
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user