Move FindTilesInCircle from WorldUtils to Map

This commit is contained in:
Pavlos Touboulidis
2014-06-13 14:24:53 +03:00
parent 03b8096807
commit 060d5326ed
11 changed files with 70 additions and 60 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA
var total = (double)world.Map.Bounds.Width * world.Map.Bounds.Height;
MapControl = world.Actors
.Where(a => !a.IsDead() && a.IsInWorld && a.Owner == player && a.HasTrait<RevealsShroud>())
.SelectMany(a => world.FindTilesInCircle(a.Location, a.Trait<RevealsShroud>().Range.Clamp(WRange.Zero, WRange.FromCells(50)).Range / 1024))
.SelectMany(a => world.Map.FindTilesInCircle(a.Location, a.Trait<RevealsShroud>().Range.Clamp(WRange.Zero, WRange.FromCells(50)).Range / 1024))
.Distinct()
.Count() / total;
}