1
0
forked from 0ad/0ad

Fix units not reentering FORMATIONMEMBER.IDLE when no orders left

In 4ca448a686 : Make sure that formation members that end up in
INDIVIDUAL.IDLE go back to FORMATION.IDLE for sanity and for better
housekeeping

Differential Revision: https://code.wildfiregames.com/D2558
This was SVN commit r23357.
This commit is contained in:
Angen 2020-01-10 09:31:22 +00:00
parent 34db988888
commit ae341353d8

View File

@ -3673,6 +3673,7 @@ UnitAI.prototype.FinishOrder = function()
// Check if there are queued formation orders
if (this.IsFormationMember())
{
this.SetNextState("FORMATIONMEMBER.IDLE");
let cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
if (cmpUnitAI)
{