From 17d8db6c34a8eb479d504bf4e6c6a796189d1da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 15 Feb 2022 09:44:39 +0100 Subject: [PATCH] Remove debug graphics when pathfinding cache is being wiped --- js/pathfinding.js | 2 ++ 1 file changed, 2 insertions(+) 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) {