Now coloring A* cells by owning player color. Added checkbox to cheats menu.

This commit is contained in:
Matthias Mailänder
2013-03-10 07:33:25 +01:00
parent 7d0de5645f
commit 493eb10b96
4 changed files with 49 additions and 22 deletions

View File

@@ -120,7 +120,8 @@ namespace OpenRA.Mods.RA.Move
public List<CPos> FindBidiPath( /* searches from both ends toward each other */
PathSearch fromSrc,
PathSearch fromDest)
PathSearch fromDest,
Player onBehalfOf)
{
using (new PerfSample("Pathfinder"))
{
@@ -155,8 +156,8 @@ namespace OpenRA.Mods.RA.Move
var dbg = world.WorldActor.TraitOrDefault<DebugOverlay>();
if (dbg != null)
{
dbg.AddLayer(fromSrc.considered.Select(p => new Pair<CPos, int>(p, fromSrc.cellInfo[p.X, p.Y].MinCost)), fromSrc.maxCost);
dbg.AddLayer(fromDest.considered.Select(p => new Pair<CPos, int>(p, fromDest.cellInfo[p.X, p.Y].MinCost)), fromDest.maxCost);
dbg.AddLayer(fromSrc.considered.Select(p => new Pair<CPos, int>(p, fromSrc.cellInfo[p.X, p.Y].MinCost)), fromSrc.maxCost, onBehalfOf);
dbg.AddLayer(fromDest.considered.Select(p => new Pair<CPos, int>(p, fromDest.cellInfo[p.X, p.Y].MinCost)), fromDest.maxCost, onBehalfOf);
}
if (path != null)