diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-29 03:22:20 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-29 03:24:40 +0400 |
commit | 3448822b2ffc2a560c6902470d5a572dfa344e1d (patch) | |
tree | 305a7e63b4c6aa41ba538929420f785ef9729d84 /source | |
parent | a197d02b030629bb94b1aeb0f4860e9d728a8503 (diff) |
Fix T39614: Ping Pong Action doesn't work correctly
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Converter/BL_ActionActuator.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 34d36846968..b606cd1c574 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -254,12 +254,17 @@ bool BL_ActionActuator::Update(double curtime, bool frame) // Handle a finished animation 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) + { m_flag ^= ACT_FLAG_REVERSE; - return false; + } + else + { + m_flag &= ~ACT_FLAG_ACTIVE; + m_flag &= ~ACT_FLAG_ATTEMPT_PLAY; + + return false; + } } // If a different action is playing, we've been overruled and are no longer active |