mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 03:52:10 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user