Commit: 3448822b2ffc2a560c6902470d5a572dfa344e1d
Author: Mitchell Stokes
Date:   Mon Apr 28 16:22:20 2014 -0700
https://developer.blender.org/rB3448822b2ffc2a560c6902470d5a572dfa344e1d

Fix T39614: Ping Pong Action doesn't work correctly

===================================================================

M       source/gameengine/Converter/BL_ActionActuator.cpp

===================================================================

diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp 
b/source/gameengine/Converter/BL_ActionActuator.cpp
index 34d3684..b606cd1 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

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to