FIX works
This commit is contained in:
@@ -15,6 +15,7 @@ namespace OpenRa.Game
|
||||
Func<int2, bool> customBlock;
|
||||
public bool checkForBlocked;
|
||||
public bool ignoreTerrain;
|
||||
public Actor ignoreBuilding;
|
||||
|
||||
public PathSearch()
|
||||
{
|
||||
@@ -28,6 +29,12 @@ namespace OpenRa.Game
|
||||
return this;
|
||||
}
|
||||
|
||||
public PathSearch WithIgnoredBuilding(Actor b)
|
||||
{
|
||||
ignoreBuilding = b;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int2 Expand( float[][ , ] passableCost )
|
||||
{
|
||||
var p = queue.Pop();
|
||||
@@ -49,7 +56,8 @@ namespace OpenRa.Game
|
||||
{
|
||||
if (passableCost[(int)umt][newHere.X, newHere.Y] == float.PositiveInfinity)
|
||||
continue;
|
||||
if (!Game.BuildingInfluence.CanMoveHere(newHere))
|
||||
if (!Game.BuildingInfluence.CanMoveHere(newHere) &&
|
||||
Game.BuildingInfluence.GetBuildingAt(newHere) != ignoreBuilding)
|
||||
continue;
|
||||
if (Rules.Map.IsOverlaySolid(newHere))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user