[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38048] branches/soc-2011-pepper/source/ gameengine/Converter/BL_ActionActuator.cpp: BGE Animations: Making the action actuator's loop end play mode work better.

Mitchell Stokes mogurijin at gmail.com
Sun Jul 3 04:57:51 CEST 2011


Revision: 38048
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38048
Author:   moguri
Date:     2011-07-03 02:57:50 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
BGE Animations: Making the action actuator's loop end play mode work better.

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-07-03 02:51:14 UTC (rev 38047)
+++ branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp	2011-07-03 02:57:50 UTC (rev 38048)
@@ -203,8 +203,9 @@
 		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, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags);
-			obj->SetActionFrame(m_layer, m_localtime);
+			start = obj->GetActionFrame(m_layer);
+			obj->StopAction(m_layer);
+			obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags);
 
 			return true;
 		}
@@ -215,6 +216,8 @@
 			start = obj->GetActionFrame(m_layer);
 			obj->StopAction(m_layer);
 			obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags);
+
+			return true;
 		}
 		
 		m_is_going = false;




More information about the Bf-blender-cvs mailing list