diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-02-22 09:58:05 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-02-22 09:58:05 +0300 |
commit | c2782ce10e00535f92921432f79ae00bf750509a (patch) | |
tree | 05e80e1cf88b2ec73bb3b7a7b0d2953b0e8368ef /source/gameengine/Ketsji | |
parent | dcb751725ed3057c29aca57f04479ef9a4380d82 (diff) |
added 'disable sleeping' option for rigidbodies. + bugfix of out of sync wheels for vehicle
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObject.h | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index b1922e247d1..a976a6b13b1 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -85,6 +85,7 @@ struct KX_ObjectProperties bool m_isactor; bool m_concave; bool m_isdeformable; + bool m_disableSleeping; KX_BoundBoxClass m_boundclass; union { KX_BoxBounds box; diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 73b49150414..8f3a6a2470c 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -1033,6 +1033,10 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, gameobj->SetPhysicsController(physicscontroller,isbulletdyna); physicscontroller->setNewClientInfo(gameobj->getClientInfo()); + + if (objprop->m_disableSleeping) + physicscontroller->GetRigidBody()->SetActivationState(DISABLE_DEACTIVATION); + bool isActor = objprop->m_isactor; gameobj->getClientInfo()->m_type = (isActor ? KX_ClientObjectInfo::ACTOR : KX_ClientObjectInfo::STATIC); // store materialname in auxinfo, needed for touchsensors |