1
0
forked from mirrors/0ad

Do not stack fleeing orders.

Differential Revision: https://code.wildfiregames.com/D2162
Patch by: Freagarach
Replace current fleeing order with new fleeing order instead adding new
one on top of current fleeing order, what was causing fleeing unit to
move further away as it should.

This was SVN commit r23637.
This commit is contained in:
Angen
2020-05-07 17:29:35 +00:00
parent 5fcade9ffd
commit 093285bf35
@@ -4947,6 +4947,8 @@ UnitAI.prototype.RespondToTargetedEntities = function(ents)
if (this.GetStance().respondFlee)
{
if (this.order && this.order.type == "Flee")
this.orderQueue.shift();
this.PushOrderFront("Flee", { "target": ents[0], "force": false });
return true;
}