From 96cb690431b77203d01db5624b716f0c7295847b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Wed, 9 Feb 2022 08:56:38 +0100 Subject: [PATCH] Use foundries new, improved way of wainting for animations when moving tokens (fixes #156) --- src/foundry_imports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundry_imports.js b/src/foundry_imports.js index 80ab9ad..fa709c2 100644 --- a/src/foundry_imports.js +++ b/src/foundry_imports.js @@ -91,7 +91,7 @@ async function animateEntities(entities, draggedEntity, draggedRays, wasPaused) }); await draggedEntity.scene.updateEmbeddedDocuments(draggedEntity.constructor.embeddedName, updates, {animate}); if (animate) - await Promise.all(entityPaths.map(({entity, path}) => entity.animateMovement(path))); + await Promise.all(entityPaths.map(({entity}) => CanvasAnimation.getAnimation(entity.movementAnimationName)?.promise)); // This is a flag of the "Monk's Active Tile Triggers" module that signals that the movement should be cancelled early if (this.cancelMovement) {