diff --git a/js/main.js b/js/main.js index 5fd837a..e25cd39 100644 --- a/js/main.js +++ b/js/main.js @@ -109,7 +109,7 @@ Hooks.once("enhancedTerrainLayer.ready", (RuleProvider) => { let obstacles = []; let costs = []; for(var ii = 0; ii= tokenElevation && (terrain[ii].object.document.elevation-(terrain[ii].object.document.depth ?? 0)) <= tokenElevation && (token?.actor?.alliance ?? "none" !== (terrain[ii].object?.actor?.alliance ?? 0))){ + if(terrain[ii].object.document.top >= tokenElevation && terrain[ii].object.document.bottom <= tokenElevation && (token?.actor?.alliance ?? "none" !== (terrain[ii].object?.actor?.alliance ?? 0))){ environments.push(terrain[ii].environment) obstacles.push(terrain[ii].obstacle) costs.push(terrain[ii].cost)