Remove legacy A* visualisation.
This commit is contained in:
@@ -115,10 +115,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public List<CPos> FindPath(IPathSearch search)
|
||||
{
|
||||
var dbg = world.WorldActor.TraitOrDefault<PathfinderDebugOverlay>();
|
||||
if (dbg != null && dbg.Visible)
|
||||
search.Debug = true;
|
||||
|
||||
List<CPos> path = null;
|
||||
|
||||
while (search.CanExpand)
|
||||
@@ -131,9 +127,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
if (dbg != null && dbg.Visible)
|
||||
dbg.AddLayer(search.Considered, search.MaxCost, search.Owner);
|
||||
|
||||
search.Graph.Dispose();
|
||||
|
||||
if (path != null)
|
||||
@@ -149,13 +142,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
List<CPos> path = null;
|
||||
|
||||
var dbg = world.WorldActor.TraitOrDefault<PathfinderDebugOverlay>();
|
||||
if (dbg != null && dbg.Visible)
|
||||
{
|
||||
fromSrc.Debug = true;
|
||||
fromDest.Debug = true;
|
||||
}
|
||||
|
||||
while (fromSrc.CanExpand && fromDest.CanExpand)
|
||||
{
|
||||
// make some progress on the first search
|
||||
@@ -179,12 +165,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
if (dbg != null && dbg.Visible)
|
||||
{
|
||||
dbg.AddLayer(fromSrc.Considered, fromSrc.MaxCost, fromSrc.Owner);
|
||||
dbg.AddLayer(fromDest.Considered, fromDest.MaxCost, fromDest.Owner);
|
||||
}
|
||||
|
||||
fromSrc.Graph.Dispose();
|
||||
fromDest.Graph.Dispose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user