Refactor per-player shrouds & fix shellmap shroud.

This commit is contained in:
Paul Chote
2013-04-10 00:35:39 +12:00
parent 66eff85aa4
commit c428cad70c
33 changed files with 146 additions and 120 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())