Rename a function call that was forgotten during the the renaming from Token to Entity (fixes #74)

This commit is contained in:
Manuel Vögele
2021-05-18 22:23:53 +02:00
parent a7811d6894
commit 7cee1e7af0
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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.
+1 -1
View File
@@ -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));
})