Fix error caused by unit dying while attacking.
This was SVN commit r12919.
This commit is contained in:
parent
94c7a0dcf6
commit
2004fb5e62
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user