diff options
Diffstat (limited to 'source/gameengine/Converter/BL_ArmatureObject.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 340ed2b1644..bf774bf7568 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -53,6 +53,7 @@ BL_ArmatureObject::BL_ArmatureObject( : KX_GameObject(sgReplicationInfo,callbacks), m_objArma(armature), + m_framePose(NULL), m_lastframe(0.0), m_activeAct(NULL), m_activePriority(999), @@ -123,10 +124,15 @@ bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority, m_activePriority = 9999; m_lastframe= curtime; m_activeAct = NULL; + // remember the pose at the start of the frame + m_framePose = m_pose; } if (priority<=m_activePriority) { + if (priority<m_activePriority) + // this action overwrites the previous ones, start from initial pose to cancel their effects + m_pose = m_framePose; if (m_activeAct && (m_activeAct!=act)) m_activeAct->SetBlendTime(0.0); /* Reset the blend timer */ m_activeAct = act; |