|
From: <yx...@us...> - 2012-03-20 16:44:30
|
Revision: 300
http://simspark.svn.sourceforge.net/simspark/?rev=300&view=rev
Author: yxu
Date: 2012-03-20 16:44:23 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
bugfix: MoveAndRotateAgent could not be called more than once in one cycle
Modified Paths:
--------------
trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp
Modified: trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp
===================================================================
--- trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2012-03-06 23:50:21 UTC (rev 299)
+++ trunk/rcssserver3d/plugin/soccer/soccerbase/soccerbase.cpp 2012-03-20 16:44:23 UTC (rev 300)
@@ -679,8 +679,6 @@
bool
SoccerBase::MoveAndRotateAgent(boost::shared_ptr<Transform> agent_aspect, const Vector3f& pos, float angle)
{
- Vector3f agentPos = agent_aspect->GetWorldTransform().Pos();
-
boost::shared_ptr<Transform> parent = shared_dynamic_cast<Transform>
(agent_aspect->FindParentSupportingClass<Transform>().lock());
@@ -705,7 +703,7 @@
boost::shared_ptr<RigidBody> body;
GetAgentBody(agent_aspect, body);
-
+ const Vector3f& agentPos = body->GetPosition();
Matrix bodyR = body->GetRotation();
bodyR.InvertRotationMatrix();
Matrix mat;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|