From d05cb9bca5654a621a9daf7547fa031ab467ef85 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Fri, 22 Feb 2013 23:55:06 +0000 Subject: BGE: (partial?) fix for #34330 "Action Actuator "caching" the previous ran actions" reported by Dalai. The test file now works if all of the actions are using the same layer, but multiple layers can still cause problems. However, I am unsure as to what the "correct" behavior should be with multiple layers. They should probably blend somehow... --- source/gameengine/Ketsji/BL_Action.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/gameengine/Ketsji/BL_Action.cpp') diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp index 5b7a2313f43..089a4050023 100644 --- a/source/gameengine/Ketsji/BL_Action.cpp +++ b/source/gameengine/Ketsji/BL_Action.cpp @@ -162,6 +162,14 @@ bool BL_Action::Play(const char* name, m_obj->GetSGNode()->AddSGController(sg_contr); sg_contr->SetObject(m_obj->GetSGNode()); + // Try obcolor + sg_contr = BL_CreateObColorIPO(m_action, m_obj, KX_GetActiveScene()->GetSceneConverter()); + if (sg_contr) { + m_sg_contr_list.push_back(sg_contr); + m_obj->GetSGNode()->AddSGController(sg_contr); + sg_contr->SetObject(m_obj->GetSGNode()); + } + // Extra controllers if (m_obj->GetGameObjectType() == SCA_IObject::OBJ_LIGHT) { -- cgit v1.2.3