From b68f3bbe29ce2da0f28bb1a91ac0359dce35275f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 8 Mar 2022 11:45:58 +0100 Subject: [PATCH 1/2] Elevation also needs to be respected if only "wall-height" is enabled --- js/pathfinding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pathfinding.js b/js/pathfinding.js index 4cc72f1..f879470 100644 --- a/js/pathfinding.js +++ b/js/pathfinding.js @@ -79,7 +79,7 @@ export function findPath(from, to, token, previousWaypoints) { let tokenSize = Math.max(token.data.width, token.data.height) * canvas.dimensions.size; let pathfinder = gridlessPathfinders.get(tokenSize); if (!pathfinder) { - pathfinder = GridlessPathfinding.initialize(canvas.walls.placeables, tokenSize, token.data.elevation, Boolean(game.modules.get("levels")?.active)); + pathfinder = GridlessPathfinding.initialize(canvas.walls.placeables, tokenSize, token.data.elevation, Boolean(game.modules.get("wall-height")?.active)); gridlessPathfinders.set(tokenSize, pathfinder); } paintGridlessPathfindingDebug(pathfinder); From 6604e322bdfd36a03557a3d8397bd9bf2346fea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 8 Mar 2022 11:49:27 +0100 Subject: [PATCH 2/2] Show diagnoal count in debug print --- js/pathfinding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pathfinding.js b/js/pathfinding.js index f879470..395a442 100644 --- a/js/pathfinding.js +++ b/js/pathfinding.js @@ -245,7 +245,7 @@ function paintGriddedPathfindingDebug(lastNode, token) { debugGraphics.removeChildren().forEach(c => c.destroy()); let currentNode = lastNode; while (currentNode) { - let text = new PIXI.Text(currentNode.cost.toFixed(0)); + let text = new PIXI.Text(currentNode.cost.toFixed(1)); let pixels = getSnapPointForTokenObj(getPixelsFromGridPositionObj(currentNode.node), token); text.anchor.set(0.5, 1.0); text.x = pixels.x;