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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user