Use Contains method on Selection when possible.
This allows the set to be utilized for a fast check, rather than degrading to a linear search via LINQ.
This commit is contained in:
@@ -192,7 +192,7 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
foreach (var g in World.ActorsHavingTrait<Selectable>().Where(a => !a.Disposed
|
||||
&& !World.FogObscures(a)
|
||||
&& !World.Selection.Actors.Contains(a)))
|
||||
&& !World.Selection.Contains(a)))
|
||||
{
|
||||
if (Game.Settings.Game.StatusBars == StatusBarsType.Standard)
|
||||
new SelectionBarsRenderable(g, false, false).Render(this);
|
||||
|
||||
Reference in New Issue
Block a user