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
-2
View File
@@ -2,7 +2,6 @@ import {currentSpeedProvider, getColorForDistanceAndToken, getRangesFromSpeedPro
import {getHexSizeSupportTokenGridCenter} from "./compatibility.js";
import {cancelScheduledMeasurement, measure} from "./foundry_imports.js"
import {getMovementHistory} from "./movement_tracking.js";
import {wipeGriddedPathfindingCache} from "./pathfinding.js";
import {settingsKey} from "./settings.js";
import {getSnapPointForEntity} from "./util.js";
@@ -187,7 +186,6 @@ export function extendRuler() {
return;
const ruler = canvas.controls.ruler;
ruler.clear();
wipeGriddedPathfindingCache();
ruler._state = Ruler.STATES.STARTING;
let entityCenter;
if (isToken && canvas.grid.isHex && game.modules.get("hex-size-support")?.active && CONFIG.hexSizeSupport.getAltSnappingFlag(entity))