Let for loop return early. Small code style fix.
This was SVN commit r15209.
This commit is contained in:
parent
7f5264d3be
commit
8589003ac6
@ -5584,15 +5584,11 @@ UnitAI.prototype.CanHeal = function(target)
|
||||
return false;
|
||||
|
||||
// Verify that the target is a healable class
|
||||
var healable = false;
|
||||
for (var healableClass of cmpHeal.GetHealableClasses())
|
||||
if (cmpIdentity.HasClass(healableClass))
|
||||
healable = true;
|
||||
return true;
|
||||
|
||||
if (!healable)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
UnitAI.prototype.CanReturnResource = function(target, checkCarriedResource)
|
||||
|
Loading…
Reference in New Issue
Block a user