diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-12-11 08:20:19 +0300 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-12-11 11:05:11 +0300 |
commit | 1999b5a8147129ac7b82a5e57420ab8e5d7734a2 (patch) | |
tree | b0fd6a6c12d759a0b96114c722fa8eee17ec46aa /source/gameengine/Converter | |
parent | 2617d370341257af577ba35924878416b3736804 (diff) |
Fix ping-pong actions when using the Action Actuator.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_ActionActuator.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index f1a7287c0fe..c756d8695e6 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -256,12 +256,14 @@ bool BL_ActionActuator::Update(double curtime, bool frame) if ((m_flag & ACT_FLAG_PLAY_END) && (m_flag & ACT_FLAG_ACTIVE) && obj->IsActionDone(m_layer)) { m_flag &= ~ACT_FLAG_ACTIVE; - m_flag &= ~ACT_FLAG_ATTEMPT_PLAY; - if (m_playtype == ACT_ACTION_PINGPONG) + if (m_playtype == ACT_ACTION_PINGPONG) { m_flag ^= ACT_FLAG_REVERSE; - else + } + else { + m_flag &= ~ACT_FLAG_ATTEMPT_PLAY; return false; + } } // If a different action is playing, we've been overruled and are no longer active |