Index: source/simulation2/components/CCmpUnitMotion.cpp =================================================================== --- source/simulation2/components/CCmpUnitMotion.cpp +++ source/simulation2/components/CCmpUnitMotion.cpp @@ -489,6 +489,13 @@ virtual void StopMoving() { + if (m_FacePointAfterMove) + { + CmpPtr cmpPosition(GetEntityHandle()); + if (cmpPosition && cmpPosition->IsInWorld()) + FaceTowardsPointFromPos(cmpPosition->GetPosition2D(), m_FinalGoal.x, m_FinalGoal.z); + } + m_MoveRequest = MoveRequest(); m_ExpectedPathTicket = 0; m_PathState = PATHSTATE_NONE; @@ -721,9 +728,6 @@ if (CloseEnoughFromDestinationToStop(pos)) { MoveSucceeded(); - - if (m_FacePointAfterMove) - FaceTowardsPointFromPos(pos, m_FinalGoal.x, m_FinalGoal.z); return; } @@ -894,10 +898,6 @@ if (CloseEnoughFromDestinationToStop(pos)) { MoveSucceeded(); - - if (m_FacePointAfterMove) - FaceTowardsPointFromPos(pos, m_FinalGoal.x, m_FinalGoal.z); - return; } @@ -985,9 +985,6 @@ // Not in formation, so just finish moving MoveSucceeded(); - - if (m_FacePointAfterMove) - FaceTowardsPointFromPos(pos, m_FinalGoal.x, m_FinalGoal.z); // TODO: if the goal was a square building, we ought to point towards the // nearest point on the square, not towards its center }