diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-10 15:36:54 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-10 18:08:11 +0300 |
commit | 3c77822f96e6ef6972c3a87467a4941d7a114744 (patch) | |
tree | 138a4d7d378e0492f070b6068ccb7123b6b7ea1e /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | 0c82ba4213577c1b02b2060888f8c43c265c1637 (diff) |
BGE: Fix T19377 restore dynamics after unparenting object.
Reviewers: scorpion81
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 7021d527abb..c3da80bc14f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1616,7 +1616,8 @@ void KX_GameObject::Resume(void) { if (m_suspended) { SCA_IObject::Resume(); - if (GetPhysicsController()) + // Child objects must be static, so we block changing to dynamic + if (GetPhysicsController() && !GetParent()) GetPhysicsController()->RestoreDynamics(); m_suspended = false; @@ -3438,7 +3439,8 @@ PyObject *KX_GameObject::PySuspendDynamics(PyObject *args) PyObject *KX_GameObject::PyRestoreDynamics() { - if (GetPhysicsController()) + // Child objects must be static, so we block changing to dynamic + if (GetPhysicsController() && !GetParent()) GetPhysicsController()->RestoreDynamics(); Py_RETURN_NONE; } |