Fix always self-moving object in offline game
This commit is contained in:
parent
2e12eeaa83
commit
46649e6b7d
@ -22,8 +22,7 @@ subject to the following restrictions:
|
||||
#include "LinearMath/btSerializer.h"
|
||||
|
||||
//'temporarily' global variables
|
||||
// Need to disable completely for STK with multiple physics instance
|
||||
//btScalar gDeactivationTime = btScalar(2.);
|
||||
btScalar gDeactivationTime = btScalar(2.);
|
||||
//bool gDisableDeactivation = false;
|
||||
//static int uniqueId = 0;
|
||||
|
||||
@ -82,7 +81,7 @@ void btRigidBody::setupRigidBody(const btRigidBody::btRigidBodyConstructionInfo&
|
||||
m_restitution = constructionInfo.m_restitution;
|
||||
|
||||
setCollisionShape( constructionInfo.m_collisionShape );
|
||||
// m_debugBodyId = uniqueId++;
|
||||
//m_debugBodyId = uniqueId++;
|
||||
btAssert(constructionInfo.m_mass>=0);
|
||||
setMassProps(constructionInfo.m_mass, constructionInfo.m_localInertia);
|
||||
updateInertiaTensor();
|
||||
|
@ -470,10 +470,10 @@ public:
|
||||
if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
|
||||
return true;
|
||||
|
||||
//if (m_deactivationTime> gDeactivationTime)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
if (m_deactivationTime> gDeactivationTime)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user