Don't always call FinishOrder when leaving a formation, as they may be in the idle state.

This was SVN commit r12548.
This commit is contained in:
Deiz
2012-08-29 19:54:29 +00:00
parent eea0a62b64
commit 781ad7d520
@@ -622,9 +622,14 @@ var UnitFsmSpec = {
// Stop moving as soon as the formation disbands
this.StopMoving();
// We're leaving the formation, so stop our FormationWalk order
if (this.FinishOrder())
return;
// If the controller handled an order but some members rejected it,
// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
if (this.orderQueue.length)
{
// We're leaving the formation, so stop our FormationWalk order
if (this.FinishOrder())
return;
}
// No orders left, we're an individual now
if (this.IsAnimal())