This commit is contained in:
Chris Forbes
2010-01-12 19:56:14 +13:00
parent 5247039345
commit 4f082bbae3

View File

@@ -309,8 +309,8 @@ namespace OpenRa.Game
public static IEnumerable<Actor> SelectActorsInBox(float2 a, float2 b)
{
return FindUnits(a, b)
.Where( x => x.LegacyInfo.Selectable )
.GroupBy(x => (x.Owner == LocalPlayer) ? x.LegacyInfo.SelectionPriority : 0)
.Where( x => x.traits.Contains<Selectable>() )
.GroupBy(x => (x.Owner == LocalPlayer) ? x.Info.Traits.Get<SelectableInfo>().Priority : 0)
.OrderByDescending(g => g.Key)
.Select( g => g.AsEnumerable() )
.DefaultIfEmpty( new Actor[] {} )