1
0
forked from 0ad/0ad

Fix error caused by unit dying while attacking.

This was SVN commit r12919.
This commit is contained in:
leper 2012-12-02 22:02:36 +00:00
parent 94c7a0dcf6
commit 2004fb5e62

View File

@ -198,7 +198,11 @@ Formation.prototype.GetMaxAttackRangeFunction = function(target)
if (!cmpAttack)
continue;
range = cmpAttack.GetRange(cmpAttack.GetBestAttackAgainst(target));
var type = cmpAttack.GetBestAttackAgainst(target);
if (!type)
continue;
range = cmpAttack.GetRange(type);
if (range.max > result)
result = range.max;
}