BGE: Fix T44782 suspend/restore dynamics on inactive object.
This commit is contained in:
parent
49f3998a0f
commit
65c3207517
Notes:
blender-bot
2023-02-14 09:06:12 +01:00
Referenced by issue #45748, Bump node : height input value bug Referenced by issue #45749, Segfault (missing MTFace cdlayer from SubSurf DM). Referenced by issue #45747, Make proxy is not working with new depsgraph Referenced by issue #44782, Parent actuator causes blender to crash
|
@ -1080,7 +1080,7 @@ void CcdPhysicsController::RefreshCollisions()
|
|||
void CcdPhysicsController::SuspendDynamics(bool ghost)
|
||||
{
|
||||
btRigidBody *body = GetRigidBody();
|
||||
if (body && !m_suspended && !GetConstructionInfo().m_bSensor)
|
||||
if (body && !m_suspended && !GetConstructionInfo().m_bSensor && GetPhysicsEnvironment()->IsActiveCcdPhysicsController(this))
|
||||
{
|
||||
btBroadphaseProxy* handle = body->getBroadphaseHandle();
|
||||
|
||||
|
@ -1102,7 +1102,7 @@ void CcdPhysicsController::SuspendDynamics(bool ghost)
|
|||
void CcdPhysicsController::RestoreDynamics()
|
||||
{
|
||||
btRigidBody *body = GetRigidBody();
|
||||
if (body && m_suspended)
|
||||
if (body && m_suspended && GetPhysicsEnvironment()->IsActiveCcdPhysicsController(this))
|
||||
{
|
||||
// before make sure any position change that was done in this logic frame are accounted for
|
||||
SetTransform();
|
||||
|
|
Loading…
Reference in New Issue