Pass enableTerrainRuler option to all measureDistances calls

This fixes a regression introduced with e1265ad6fb
This commit is contained in:
Manuel Vögele
2021-11-21 20:57:26 +01:00
parent a3be4ceb03
commit 39f7bab4b6
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ function calculateUpdate(combat, token, rays) {
// Ignore rays that have the same start and end coordinates
if (ray.A.x !== ray.B.x || ray.A.y !== ray.B.y) {
if (terrainRulerAvailable) {
measureDistances([{ray}], token, getTokenShape(token), {terrainRulerInitialState: waypoints[waypoints.length - 1]?.dragRulerFinalState});
measureDistances([{ray}], token, getTokenShape(token), {terrainRulerInitialState: waypoints[waypoints.length - 1]?.dragRulerFinalState, enableTerrainRuler: terrainRulerAvailable});
ray.A.dragRulerVisitedSpaces = ray.terrainRulerVisitedSpaces;
ray.A.dragRulerFinalState = ray.terrainRulerFinalState;
}