From 0f6d732e685489c2bad3c7eb860168704604056c Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 12 Feb 2008 00:08:48 +0000 Subject: [PATCH] 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 --- src/moving_physics.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/moving_physics.cpp b/src/moving_physics.cpp index 91b08f754..10f2b8dfa 100644 --- a/src/moving_physics.cpp +++ b/src/moving_physics.cpp @@ -203,6 +203,8 @@ void MovingPhysics::update(float dt) void MovingPhysics::reset() { m_body->setCenterOfMassTransform(m_init_pos); + m_body->setAngularVelocity(btVector3(0,0,0)); + m_body->setLinearVelocity(btVector3(0,0,0)); } // reset // -----------------------------------------------------------------------------