From 7cee1e7af053d951879c5446bc1153a22a76a052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 18 May 2021 22:23:53 +0200 Subject: [PATCH] Rename a function call that was forgotten during the the renaming from Token to Entity (fixes #74) --- CHANGELOG.md | 5 +++++ src/foundry_imports.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d27edc..8398a80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## In development +### Bugfixes +- Fixed a bug that prevented players from moving their tokens ([#74](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/74)) + + ## 1.7.0 **BREAKING** This update is incompatible with previous Terrain Ruler versions. If you're using Terrain Ruler, make sure you update Terrain Ruler to at least version 1.3.0. diff --git a/src/foundry_imports.js b/src/foundry_imports.js index fec35bb..bf8c477 100644 --- a/src/foundry_imports.js +++ b/src/foundry_imports.js @@ -21,7 +21,7 @@ export async function moveEntities(draggedEntity, selectedEntities) { const rays = this.constructor.dragRulerGetRaysFromWaypoints(this.waypoints, this.destination); if (!game.user.isGM && draggedEntity instanceof Token) { const hasCollision = selectedEntities.some(token => { - const offset = calculateTokenOffset(token, draggedEntity); + const offset = calculateEntityOffset(token, draggedEntity); const offsetRays = rays.filter(ray => !ray.isPrevious).map(ray => applyOffsetToRay(ray, offset)) return offsetRays.some(r => canvas.walls.checkCollision(r)); })