From cdc9d98e000a3551c2ff92eaf8bd6eaeb18b6eb5 Mon Sep 17 00:00:00 2001 From: mimo Date: Sat, 21 Feb 2015 17:40:59 +0000 Subject: [PATCH] do not apply multiple leavefoundation orders, fix #3010 This was SVN commit r16369. --- binaries/data/mods/public/simulation/components/UnitAI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/components/UnitAI.js b/binaries/data/mods/public/simulation/components/UnitAI.js index 99f39195e8..84c500e1b7 100644 --- a/binaries/data/mods/public/simulation/components/UnitAI.js +++ b/binaries/data/mods/public/simulation/components/UnitAI.js @@ -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 });