diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-28 03:29:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-28 03:29:07 +0400 |
commit | d7bf9688ac78169a37fbfc0d3d5bcd5b5be19170 (patch) | |
tree | e929512df0e325f954b2ba2d5612a8418c873cb3 /source/gameengine/Converter | |
parent | 324b3fbe747a6544b60be1eb8a0cb6b01db736de (diff) |
fix for crash when a parent compound object didn't get a physics controller.
also show this in the UI.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index d2e6bbb43f7..c2566caba1e 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1381,7 +1381,9 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, bool isCompoundChild = false; bool hasCompoundChildren = !parent && (blenderobject->gameflag & OB_CHILD); - if (parent/* && (parent->gameflag & OB_DYNAMIC)*/) { + /* When the parent is not OB_DYNAMIC and has no OB_COLLISION then it gets no bullet controller + * and cant be apart of the parents compound shape */ + if (parent && (parent->gameflag & (OB_DYNAMIC | OB_COLLISION))) { if ((parent->gameflag & OB_CHILD) != 0 && (blenderobject->gameflag & OB_CHILD)) { |