Only wipe gridded pathfinding cache when the wall layout changes

This commit is contained in:
Manuel Vögele
2022-02-15 09:33:24 +01:00
parent dd9a7ecf68
commit 8e29cf186b
3 changed files with 7 additions and 12 deletions
+1 -4
View File
@@ -47,11 +47,8 @@ export function findPath(from, to, token, previousWaypoints) {
}
}
export function wipeGriddedPathfindingCache() {
export function wipePathfindingCache() {
cachedNodes = undefined;
}
export function wipeGridlessPathfindingCache() {
if (gridlessPathfinder) {
GridlessPathfinding.free(gridlessPathfinder);
gridlessPathfinder = undefined;