1
0
forked from 0ad/0ad
This was SVN commit r15370.
This commit is contained in:
mimo 2014-06-15 16:13:12 +00:00
parent 519c00c1a6
commit 74e5c8ae26

View File

@ -84,8 +84,9 @@ Promotion.prototype.Promote = function(promotedTemplateName)
// Replace the garrison order by an autogarrison order,
// as we are already garrisoned and do not need to do
// any further checks (or else we should do them here).
var garrisonHolder = orders[0].data.target;
orders.shift();
cmpPromotedUnitAI.Autogarrison(orders[0].data.target);
cmpPromotedUnitAI.Autogarrison(garrisonHolder);
}
else
warn("Promoted garrisoned entity with empty order queue.");