diff options
Diffstat (limited to 'source/gameengine/Ketsji/BL_Action.cpp')
-rw-r--r-- | source/gameengine/Ketsji/BL_Action.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp index 149189b6a79..33e4e179071 100644 --- a/source/gameengine/Ketsji/BL_Action.cpp +++ b/source/gameengine/Ketsji/BL_Action.cpp @@ -46,6 +46,7 @@ extern "C" { #include "BKE_action.h" #include "RNA_access.h" #include "RNA_define.h" +#include "DNA_nla_types.h" } BL_Action::BL_Action(class KX_GameObject* gameobj) @@ -172,6 +173,7 @@ bool BL_Action::Play(const char* name, m_endframe = end; m_blendin = blendin; m_playmode = play_mode; + m_blendmode = blend_mode; m_endtime = 0.f; m_blendframe = 0.f; m_blendstart = 0.f; @@ -328,12 +330,17 @@ void BL_Action::Update(float curtime) float weight = 1.f - (m_blendframe/m_blendin); // Blend the poses - game_blend_poses(m_pose, m_blendpose, weight); + game_blend_poses(m_pose, m_blendpose, weight, ACTSTRIPMODE_BLEND); } // Handle layer blending - + if (m_blendmode != ACT_BLEND_NONE) + { + obj->GetMRDPose(&m_blendpose); + game_blend_poses(m_pose, m_blendpose, 1.f, ACTSTRIPMODE_ADD); + } + obj->SetPose(m_pose); obj->SetActiveAction(NULL, 0, curtime); |