Add the pathfinding radius setting (#194)

This commit is contained in:
Cole Schultz
2022-04-29 03:41:05 -05:00
committed by GitHub
parent 0dba39b145
commit 1b8b2328c6
2 changed files with 13 additions and 3 deletions
+2 -1
View File
@@ -240,7 +240,8 @@ 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("wall-height")?.active));
let radiusMultiplier = game.settings.get(settingsKey, "pathfindingRadius");
pathfinder = GridlessPathfinding.initialize(canvas.walls.placeables, tokenSize * radiusMultiplier, token.data.elevation, Boolean(game.modules.get("wall-height")?.active));
gridlessPathfinders.set(tokenSize, pathfinder);
}
paintGridlessPathfindingDebug(pathfinder);