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) {
|
function paintPathfindingDebug(lastNode) {
|
||||||
if (CONFIG.debug.dragRuler) {
|
if (!CONFIG.debug.dragRuler)
|
||||||
debugGraphics.removeChildren();
|
return;
|
||||||
}
|
|
||||||
|
debugGraphics.removeChildren();
|
||||||
let currentNode = lastNode;
|
let currentNode = lastNode;
|
||||||
while (currentNode) {
|
while (currentNode) {
|
||||||
let text = new PIXI.Text(currentNode.cost.toFixed(0));
|
let text = new PIXI.Text(currentNode.cost.toFixed(0));
|
||||||
|
|||||||
Reference in New Issue
Block a user