|
@@ -13,6 +13,7 @@ subject to the following restrictions:
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
+// Modified by Lasse Oorni for Urho3D
|
|
|
|
|
|
|
|
#include "btDiscreteDynamicsWorld.h"
|
|
#include "btDiscreteDynamicsWorld.h"
|
|
|
|
|
|
|
@@ -445,6 +446,8 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
|
|
|
{
|
|
{
|
|
|
internalSingleStepSimulation(fixedTimeStep);
|
|
internalSingleStepSimulation(fixedTimeStep);
|
|
|
synchronizeMotionStates();
|
|
synchronizeMotionStates();
|
|
|
|
|
+ // Urho3D: clear forces after each substep
|
|
|
|
|
+ clearForces();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else
|
|
} else
|
|
@@ -452,8 +455,6 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
|
|
|
synchronizeMotionStates();
|
|
synchronizeMotionStates();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- clearForces();
|
|
|
|
|
-
|
|
|
|
|
#ifndef BT_NO_PROFILE
|
|
#ifndef BT_NO_PROFILE
|
|
|
CProfileManager::Increment_Frame_Counter();
|
|
CProfileManager::Increment_Frame_Counter();
|
|
|
#endif //BT_NO_PROFILE
|
|
#endif //BT_NO_PROFILE
|