diff --git a/OpenRa.Game/Ore.cs b/OpenRa.Game/Ore.cs index 90005f01e9..69e58b5feb 100644 --- a/OpenRa.Game/Ore.cs +++ b/OpenRa.Game/Ore.cs @@ -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, diff --git a/OpenRa.Game/PathSearch.cs b/OpenRa.Game/PathSearch.cs index 9967d2b77c..dcfee5c826 100755 --- a/OpenRa.Game/PathSearch.cs +++ b/OpenRa.Game/PathSearch.cs @@ -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 )