Fix counting issue with previous commit

This was SVN commit r17939.
This commit is contained in:
sanderd17 2016-03-23 10:01:27 +00:00
parent 63d276b73b
commit 82fa9d8f5b

View File

@ -260,7 +260,9 @@ BuildingAI.prototype.GetArrowCount = function()
let count = this.GetDefaultArrowCount() +
Math.round(this.archersGarrisoned * this.GetGarrisonArrowMultiplier());
return Math.min(this.GetMaxArrowCount(), count);
if (count > this.GetMaxArrowCount())
return this.GetMaxArrowCount();
return count;
};
BuildingAI.prototype.SetUnitAITarget = function(ent)