Fix Service Depot Rally point path finding (+rename ignoredActor)
This commit is contained in:
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
|
||||
public IPathSearch WithIgnoredActor(Actor b)
|
||||
{
|
||||
Graph.IgnoredActor = b;
|
||||
Graph.IgnoreActor = b;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
this.cacheStorage = cacheStorage;
|
||||
}
|
||||
|
||||
public List<CPos> FindUnitPath(CPos source, CPos target, Actor self)
|
||||
public List<CPos> FindUnitPath(CPos source, CPos target, Actor self, Actor ignoreActor)
|
||||
{
|
||||
using (new PerfSample("Pathfinder"))
|
||||
{
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
if (cachedPath != null)
|
||||
return cachedPath;
|
||||
|
||||
var pb = pathFinder.FindUnitPath(source, target, self);
|
||||
var pb = pathFinder.FindUnitPath(source, target, self, ignoreActor);
|
||||
|
||||
cacheStorage.Store(key, pb);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
|
||||
bool InReverse { get; set; }
|
||||
|
||||
Actor IgnoredActor { get; set; }
|
||||
Actor IgnoreActor { get; set; }
|
||||
|
||||
World World { get; }
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
public Func<CPos, int> CustomCost { get; set; }
|
||||
public int LaneBias { get; set; }
|
||||
public bool InReverse { get; set; }
|
||||
public Actor IgnoredActor { get; set; }
|
||||
public Actor IgnoreActor { get; set; }
|
||||
|
||||
readonly CellConditions checkConditions;
|
||||
readonly MobileInfo mobileInfo;
|
||||
@@ -171,7 +171,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
|
||||
int GetCostToNode(CPos destNode, CVec direction)
|
||||
{
|
||||
var movementCost = mobileInfo.MovementCostToEnterCell(worldMovementInfo, Actor, destNode, IgnoredActor, checkConditions);
|
||||
var movementCost = mobileInfo.MovementCostToEnterCell(worldMovementInfo, Actor, destNode, IgnoreActor, checkConditions);
|
||||
if (movementCost != int.MaxValue && !(CustomBlock != null && CustomBlock(destNode)))
|
||||
return CalculateCellCost(destNode, direction, movementCost);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user