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"
|
#include "LinearMath/btSerializer.h"
|
||||||
|
|
||||||
//'temporarily' global variables
|
//'temporarily' global variables
|
||||||
// Need to disable completely for STK with multiple physics instance
|
btScalar gDeactivationTime = btScalar(2.);
|
||||||
//btScalar gDeactivationTime = btScalar(2.);
|
|
||||||
//bool gDisableDeactivation = false;
|
//bool gDisableDeactivation = false;
|
||||||
//static int uniqueId = 0;
|
//static int uniqueId = 0;
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ void btRigidBody::setupRigidBody(const btRigidBody::btRigidBodyConstructionInfo&
|
|||||||
m_restitution = constructionInfo.m_restitution;
|
m_restitution = constructionInfo.m_restitution;
|
||||||
|
|
||||||
setCollisionShape( constructionInfo.m_collisionShape );
|
setCollisionShape( constructionInfo.m_collisionShape );
|
||||||
// m_debugBodyId = uniqueId++;
|
//m_debugBodyId = uniqueId++;
|
||||||
btAssert(constructionInfo.m_mass>=0);
|
btAssert(constructionInfo.m_mass>=0);
|
||||||
setMassProps(constructionInfo.m_mass, constructionInfo.m_localInertia);
|
setMassProps(constructionInfo.m_mass, constructionInfo.m_localInertia);
|
||||||
updateInertiaTensor();
|
updateInertiaTensor();
|
||||||
|
@ -470,10 +470,10 @@ public:
|
|||||||
if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
|
if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//if (m_deactivationTime> gDeactivationTime)
|
if (m_deactivationTime> gDeactivationTime)
|
||||||
//{
|
{
|
||||||
// return true;
|
return true;
|
||||||
//}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user