1
0
forked from mirrors/0ad

do not apply multiple leavefoundation orders, fix #3010

This was SVN commit r16369.
This commit is contained in:
mimo
2015-02-21 17:40:59 +00:00
parent e67379a25f
commit cdc9d98e00
@@ -4917,7 +4917,7 @@ UnitAI.prototype.LeaveFoundation = function(target)
// ignore this new request so we don't end up being too indecisive
// to ever actually move anywhere
// Ignore also the request if we are packing
if (this.order && (this.order.type == "LeaveFoundation" || this.IsPacking()))
if (this.order && (this.order.type == "LeaveFoundation" || (this.order.type == "Flee" && this.order.data.target == target) || this.IsPacking()))
return;
this.PushOrderFront("LeaveFoundation", { "target": target, "force": true });