Revision: 37768
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37768
Author:   moguri
Date:     2011-06-23 22:00:54 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
BGE Animations: Making the play modes for the Acton Actuator behave more like 
they have in the past. The only one that still needs work now is Flipper. 
Property, Loop End, Loop Stop, Play, and Ping Pong should all now be behaving 
as they used to.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp

Modified: 
branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp
===================================================================
--- branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp  
2011-06-23 21:11:17 UTC (rev 37767)
+++ branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp  
2011-06-23 22:00:54 UTC (rev 37768)
@@ -189,17 +189,28 @@
                        obj->SetActionFrame(m_layer, m_localtime);
        }
        else if (m_is_going && bNegativeEvent)
-       {
-               m_is_going = false;
-               
-               if (!m_end_reset)
+       {               
+               if (m_playtype == ACT_ACTION_LOOP_STOP)
                {
-                       obj->StopAction(m_layer);
-                       return false;
+                       if (!m_end_reset)
+                       {
+                               obj->StopAction(m_layer);
+                               return false;
+                       }
+
+                       m_localtime = obj->GetActionFrame(m_layer);
+                       obj->StopAction(m_layer); // Stop the action after 
getting the frame
                }
+               else if (m_playtype == ACT_ACTION_LOOP_END)
+               {
+                       // Convert into a play and let it finish
+                       obj->PlayAction(m_action->id.name+2, start, end, 
m_layer, 0, BL_Action::ACT_MODE_PLAY, 0, m_ipo_flags);
+                       obj->SetActionFrame(m_layer, m_localtime);
 
-               m_localtime = obj->GetActionFrame(m_layer);
-               obj->StopAction(m_layer); // Stop the action after getting the 
frame
+                       return true;
+               }
+               
+               m_is_going = false;
        }
 
        // Handle a frame property if it's defined
@@ -214,13 +225,11 @@
 
                newval->Release();
        }
-       if (m_playtype == ACT_ACTION_FROM_PROP)
-       {
-               return true;
-       }
        // Handle a finished animation
-       else if (m_is_going && obj->IsActionDone(m_layer))
+       if (m_is_going && obj->IsActionDone(m_layer))
        {
+               m_is_going = false;
+               obj->StopAction(m_layer);
                return false;
        }
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to