[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29661] branches/soc-2010-nicks/source/ gameengine/Ketsji/KX_SteeringActuator.cpp: don' t add obstacles for navmesh walls in the path following mode

Nick Samarin nicks1987 at bigmir.net
Thu Jun 24 00:51:26 CEST 2010


Revision: 29661
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29661
Author:   nicks
Date:     2010-06-24 00:51:26 +0200 (Thu, 24 Jun 2010)

Log Message:
-----------
don't add obstacles for navmesh walls in the path following mode

Modified Paths:
--------------
    branches/soc-2010-nicks/source/gameengine/Ketsji/KX_SteeringActuator.cpp

Modified: branches/soc-2010-nicks/source/gameengine/Ketsji/KX_SteeringActuator.cpp
===================================================================
--- branches/soc-2010-nicks/source/gameengine/Ketsji/KX_SteeringActuator.cpp	2010-06-23 18:47:56 UTC (rev 29660)
+++ branches/soc-2010-nicks/source/gameengine/Ketsji/KX_SteeringActuator.cpp	2010-06-23 22:51:26 UTC (rev 29661)
@@ -201,7 +201,7 @@
 				{
 					terminate = false;
 
-					static const MT_Scalar WAYPOINT_RADIUS(1.);
+					static const MT_Scalar WAYPOINT_RADIUS(0.25);
 
 					if (m_pathUpdateTime<0 || (m_pathUpdatePeriod>=0 && 
 												curtime - m_pathUpdateTime>((double)m_pathUpdatePeriod/1000)))
@@ -252,8 +252,8 @@
 			if (m_simulation && m_obstacle && !newvel.fuzzyZero())
 			{
 				KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.,0.,0.));
-				m_simulation->AdjustObstacleVelocity(m_obstacle, m_navmesh, newvel, 
-								m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta);
+				m_simulation->AdjustObstacleVelocity(m_obstacle, m_mode!=KX_STEERING_PATHFOLLOWING ? m_navmesh : NULL, 
+								newvel, m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta);
 				KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.,1.,0.));
 			}
 





More information about the Bf-blender-cvs mailing list