diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-01 01:53:39 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-01 01:53:39 +0400 |
commit | 234b616078ab5de7c6ef2a96c8a201a7552ae96c (patch) | |
tree | e038d18a6dc8a2445e27d690f6b3f535c15c262a | |
parent | 7f257df5b41841fcafbc48324d4522e9e4e1cc2e (diff) |
BGE bug #17459 fixed: action actuators depending on their order in the actuator list.
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 09f1d9d4d87..cdfce321713 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -54,6 +54,7 @@ BL_ArmatureObject::BL_ArmatureObject( : KX_GameObject(sgReplicationInfo,callbacks), m_objArma(armature), m_mrdPose(NULL), + m_framePose(NULL), m_lastframe(0.), m_activeAct(NULL), m_activePriority(999) @@ -114,10 +115,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; diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h index 752bd5eb365..a612ca77ec0 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.h +++ b/source/gameengine/Converter/BL_ArmatureObject.h @@ -80,6 +80,7 @@ protected: struct bArmature *m_armature; struct bPose *m_pose; struct bPose *m_mrdPose; + struct bPose *m_framePose; double m_lastframe; class BL_ActionActuator *m_activeAct; short m_activePriority; |