Cache FrozenActor ITargetable.TargetTypes union

This commit is contained in:
atlimit8
2015-07-16 11:47:16 -05:00
parent 6986cd9f0e
commit fadfd179cb
5 changed files with 10 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Orders
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
{
return target.Info.Traits.WithInterface<ITargetableInfo>().Any(t => t.GetTargetTypes().Intersect(targetTypes).Any());
return target.TargetTypes.Intersect(targetTypes).Any();
}
}
}