1
1
forked from 0ad/0ad

Petra: fix the fix preventing the AI to be stuck trying to produce unavailable units

This was SVN commit r15465.
This commit is contained in:
mimo 2014-06-29 19:16:18 +00:00
parent 6ed07ef4d9
commit fd91398a95

View File

@ -288,6 +288,12 @@ var commands = {
else if (list.indexOf(promo_e) !== -1)
cmd.template = promo_e;
}
else if (cmd.template.substr(len-2,2) === "_a" && list.indexOf(cmd.template) === -1)
{
var promo_e = cmd.template.substr(0,len-2) + "_e";
if (list.indexOf(promo_e) !== -1)
cmd.template = promo_e;
}
}
if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
if ("metadata" in cmd)