Don't check IsTraitDisabled twice when calculating IsTargetableBy
This commit is contained in:
@@ -528,7 +528,7 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
// PERF: Avoid LINQ.
|
// PERF: Avoid LINQ.
|
||||||
foreach (var targetable in Targetables)
|
foreach (var targetable in Targetables)
|
||||||
if (targetable.IsTraitEnabled() && targetable.TargetableBy(this, byActor))
|
if (targetable.TargetableBy(this, byActor))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user