From ff9b187d907d6ac2ed4363b14015c2a81b2a761d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Thu, 13 Oct 2022 08:06:02 +0200 Subject: [PATCH] v10 compat: Use the new way of checking a wall collision --- src/foundry_imports.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/foundry_imports.js b/src/foundry_imports.js index dbd0152..a697f43 100644 --- a/src/foundry_imports.js +++ b/src/foundry_imports.js @@ -26,10 +26,13 @@ export async function moveEntities(draggedEntity, selectedEntities) { const offsetRays = rays .filter(ray => !ray.isPrevious) .map(ray => applyOffsetToRay(ray, offset)); - if (window.WallHeight) { - window.WallHeight.addBoundsToRays(offsetRays, draggedEntity); - } - return offsetRays.some(r => canvas.walls.checkCollision(r)); + return offsetRays.some(r => + token.checkCollision(r.B, { + origin: r.A, + mode: "any", + type: "move", + }), + ); }); if (hasCollision) { ui.notifications.error(game.i18n.localize("ERROR.TokenCollide"));