Don't try to paint debug info if debugging is disabled
This commit is contained in:
+4
-3
@@ -130,9 +130,10 @@ function estimateCost(pos, target) {
|
||||
}
|
||||
|
||||
function paintPathfindingDebug(lastNode) {
|
||||
if (CONFIG.debug.dragRuler) {
|
||||
debugGraphics.removeChildren();
|
||||
}
|
||||
if (!CONFIG.debug.dragRuler)
|
||||
return;
|
||||
|
||||
debugGraphics.removeChildren();
|
||||
let currentNode = lastNode;
|
||||
while (currentNode) {
|
||||
let text = new PIXI.Text(currentNode.cost.toFixed(0));
|
||||
|
||||
Reference in New Issue
Block a user