Introduce World.LocalShroud. Breaks targeting stealth tanks. Probably breaks FrozenUnderFog.

This commit is contained in:
Paul Chote
2010-11-26 16:56:33 +13:00
parent 41fd19c766
commit 7c5c989eb2
25 changed files with 88 additions and 161 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Widgets
IEnumerable<Actor> SelectActorsInBox(World world, float2 a, float2 b)
{
return world.FindUnits(a, b)
.Where( x => x.HasTrait<Selectable>() && x.IsVisible(world.LocalPlayer) )
.Where( x => x.HasTrait<Selectable>() && world.LocalShroud.IsVisible(x) )
.GroupBy(x => (x.Owner == world.LocalPlayer) ? x.Info.Traits.Get<SelectableInfo>().Priority : 0)
.OrderByDescending(g => g.Key)
.Select( g => g.AsEnumerable() )