[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16322] trunk/blender/source/gameengine/ Converter: BGE bug #17459 fixed: action actuators depending on their order in the actuator list.

Benoit Bolsee benoit.bolsee at online.be
Sun Aug 31 23:53:44 CEST 2008


Revision: 16322
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16322
Author:   ben2610
Date:     2008-08-31 23:53:39 +0200 (Sun, 31 Aug 2008)

Log Message:
-----------
BGE bug #17459 fixed: action actuators depending on their order in the actuator list.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
    trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h

Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp	2008-08-31 21:00:20 UTC (rev 16321)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp	2008-08-31 21:53:39 UTC (rev 16322)
@@ -54,6 +54,7 @@
 :	KX_GameObject(sgReplicationInfo,callbacks),
 	m_objArma(armature),
 	m_mrdPose(NULL),
+	m_framePose(NULL),
 	m_lastframe(0.),
 	m_activeAct(NULL),
 	m_activePriority(999)
@@ -114,10 +115,15 @@
 		m_activePriority = 9999;
 		m_lastframe= curtime;
 		m_activeAct = NULL;
+		// remember the pose at the start of the frame
+		m_framePose = m_pose;
 	}
 
 	if (priority<=m_activePriority)
 	{
+		if (priority<m_activePriority)
+			// this action overwrites the previous ones, start from initial pose to cancel their effects
+			m_pose = m_framePose;
 		if (m_activeAct && (m_activeAct!=act))
 			m_activeAct->SetBlendTime(0.0);	/* Reset the blend timer */
 		m_activeAct = act;

Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h	2008-08-31 21:00:20 UTC (rev 16321)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureObject.h	2008-08-31 21:53:39 UTC (rev 16322)
@@ -80,6 +80,7 @@
 	struct bArmature	*m_armature;
 	struct bPose		*m_pose;
 	struct bPose		*m_mrdPose;
+	struct bPose		*m_framePose;
 	double	m_lastframe;
 	class BL_ActionActuator *m_activeAct;
 	short	m_activePriority;





More information about the Bf-blender-cvs mailing list