This commit is contained in:
Chris Forbes
2009-11-09 18:20:14 +13:00
parent 831d474f51
commit 40bad1b813
2 changed files with 8 additions and 0 deletions

View File

@@ -137,6 +137,12 @@ namespace OpenRa.Game
return ore;
}
public static bool IsOverlaySolid(this Map map, int2 p)
{
var o = map.MapTiles[p.X, p.Y].overlay;
return o < overlayIsFence.Length && overlayIsFence[o];
}
public static bool[] overlayIsFence =
{
true, true, true, true, true,

View File

@@ -47,6 +47,8 @@ namespace OpenRa.Game
continue;
if (customBlock != null && customBlock(newHere))
continue;
if (Game.map.IsOverlaySolid(newHere))
continue;
var est = heuristic( newHere );
if( est == float.PositiveInfinity )