diff --git a/js/pathfinding.js b/js/pathfinding.js index b7100ec..3b61dbd 100644 --- a/js/pathfinding.js +++ b/js/pathfinding.js @@ -53,6 +53,8 @@ export function wipePathfindingCache() { GridlessPathfinding.free(gridlessPathfinder); gridlessPathfinder = undefined; } + if (debugGraphics) + debugGraphics.removeChildren().forEach(c => c.destroy()); } function getNode(pos, token, initialize=true) {