bge physics: disallowing compound collisions for soft bodies

Closes D610, T40427, T30630

Cherrypicked from local squash
Conflicts:
	release/scripts/startup/bl_ui/properties_game.py
This commit is contained in:
Ines Almeida 2014-06-24 15:44:34 +01:00
parent b7033e3d4e
commit 528514c393

@ -1389,16 +1389,14 @@ static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
}
bool isCompoundChild = false;
bool hasCompoundChildren = !parent && (blenderobject->gameflag & OB_CHILD);
bool hasCompoundChildren = !parent && (blenderobject->gameflag & OB_CHILD) && !(blenderobject->gameflag & OB_SOFT_BODY);
/* 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 */
* and cant be apart of the parents compound shape, same goes for OB_SOFT_BODY */
if (parent && (parent->gameflag & (OB_DYNAMIC | OB_COLLISION))) {
if ((parent->gameflag & OB_CHILD) != 0 && (blenderobject->gameflag & OB_CHILD))
{
if( (parent->gameflag & OB_CHILD)!=0 && (blenderobject->gameflag & OB_CHILD) && !(parent->gameflag & OB_SOFT_BODY)) {
isCompoundChild = true;
}
}
}
if (processCompoundChildren != isCompoundChild)
return;