added Shroud.Explore overload in prep for spyplane

This commit is contained in:
Chris Forbes
2010-01-23 13:19:28 +13:00
parent 0d7a1ef251
commit f1e0b46d38

View File

@@ -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<OwnedActorInfo>().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<OwnedActorInfo>().Sight);
}
static readonly byte[][] SpecialShroudTiles =
{