From de673be78a1c93e25b5ce226dc8580ce413a451b Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Wed, 6 Oct 2010 22:17:34 +0000 Subject: [PATCH] Fix likely cause of "unexpected PathResult" warnings This was SVN commit r8297. --- source/simulation2/components/CCmpUnitMotion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/simulation2/components/CCmpUnitMotion.cpp b/source/simulation2/components/CCmpUnitMotion.cpp index cb33ce98cc..1157558ad3 100644 --- a/source/simulation2/components/CCmpUnitMotion.cpp +++ b/source/simulation2/components/CCmpUnitMotion.cpp @@ -298,6 +298,7 @@ public: virtual void StopMoving() { + m_ExpectedPathTicket = 0; m_State = STATE_STOPPING; } @@ -723,8 +724,7 @@ void CCmpUnitMotion::Move(fixed dt) void CCmpUnitMotion::StopAndFaceGoal(CFixedVector2D pos) { - m_ExpectedPathTicket = 0; - m_State = STATE_STOPPING; + StopMoving(); FaceTowardsPoint(pos, m_FinalGoal.x, m_FinalGoal.z); // TODO: if the goal was a square building, we ought to point towards the