From f1e0b46d38121e51a288d79ed0e675e2979d3f56 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 23 Jan 2010 13:19:28 +1300 Subject: [PATCH] added Shroud.Explore overload in prep for spyplane --- OpenRa.Game/Shroud.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/OpenRa.Game/Shroud.cs b/OpenRa.Game/Shroud.cs index a0bbffae02..ad7b868f96 100644 --- a/OpenRa.Game/Shroud.cs +++ b/OpenRa.Game/Shroud.cs @@ -78,18 +78,23 @@ namespace OpenRa return IsExplored(x,y); } - - public void Explore(Actor a) + + public void Explore(World w, int2 center, int range) { - foreach (var t in a.World.FindTilesInCircle( - (1f / Game.CellSize * a.CenterLocation).ToInt2(), - a.Info.Traits.Get().Sight)) + foreach (var t in w.FindTilesInCircle(center, range)) { explored[t.X, t.Y] = true; gapField[t.X, t.Y] = 0; } dirty = true; } + + public void Explore(Actor a) + { + Explore(a.World, + (1f / Game.CellSize * a.CenterLocation).ToInt2(), + a.Info.Traits.Get().Sight); + } static readonly byte[][] SpecialShroudTiles = {