Remove legacy A* visualisation.

This commit is contained in:
Paul Chote
2016-08-25 19:45:18 +01:00
parent b3c4ecd7c5
commit 32eb98c17d
13 changed files with 12 additions and 152 deletions

View File

@@ -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();