Fix T41259: Objects parented to non-armature objects cannot play shape actions in the BGE

This commit is contained in:
Mitchell Stokes 2014-09-23 07:52:34 -07:00
parent d342f46682
commit ed4075cb34

@ -1577,7 +1577,7 @@ void KX_Scene::AddAnimatedObject(CValue* gameobj)
static void update_anim_thread_func(TaskPool *pool, void *taskdata, int UNUSED(threadid))
{
KX_GameObject *gameobj, *child;
KX_GameObject *gameobj, *child, *parent;
CListValue *children;
bool needs_update;
double curtime = *(double*)BLI_task_pool_userdata(pool);
@ -1621,8 +1621,11 @@ static void update_anim_thread_func(TaskPool *pool, void *taskdata, int UNUSED(t
if (needs_update) {
gameobj->UpdateActionManager(curtime);
children = gameobj->GetChildren();
parent = gameobj->GetParent();
if (!gameobj->GetParent() && gameobj->GetDeformer())
// Only do deformers here if they are not parented to an armature, otherwise the armature will
// handle updating its children
if (gameobj->GetDeformer() && (!parent || (parent && parent->GetGameObjectType() != SCA_IObject::OBJ_ARMATURE)))
gameobj->GetDeformer()->Update();
for (int j=0; j<children->GetCount(); ++j) {