Merge pull request #3020 from pchote/shroud-sanity

Refactor per-player shrouds.
This commit is contained in:
Chris Forbes
2013-04-12 01:53:31 -07:00
45 changed files with 364 additions and 340 deletions

View File

@@ -184,7 +184,7 @@ namespace OpenRA.Widgets
IEnumerable<Actor> SelectActorsInBox(World world, PPos a, PPos b, Func<Actor, bool> cond)
{
return world.FindUnits(a, b)
.Where(x => x.HasTrait<Selectable>() && world.RenderedShroud.IsVisible(x) && cond(x))
.Where(x => x.HasTrait<Selectable>() && !world.FogObscures(x) && cond(x))
.GroupBy(x => x.GetSelectionPriority())
.OrderByDescending(g => g.Key)
.Select(g => g.AsEnumerable())