Merge pull request #9734 from RoosterDragon/auto-target-perf

Improve AutoTarget performance
This commit is contained in:
Oliver Brakmann
2015-12-20 19:53:17 +01:00
18 changed files with 174 additions and 89 deletions

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Traits
CenterPosition = self.CenterPosition;
Bounds = self.Bounds;
TargetTypes = self.TraitsImplementing<ITargetable>().Where(Exts.IsTraitEnabled).SelectMany(t => t.TargetTypes).ToHashSet();
TargetTypes = self.GetEnabledTargetTypes().ToHashSet();
UpdateVisibility();
}