Don't set Token._noAnimate. It has no effect and will be removed in future foundry versions
https://gitlab.com/foundrynet/foundryvtt/-/issues/5094
This commit is contained in:
@@ -65,9 +65,6 @@ async function animateTokens(tokens, draggedToken, draggedRays, wasPaused) {
|
|||||||
return {token, rays: offsetRays, dx, dy};
|
return {token, rays: offsetRays, dx, dy};
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const {token, rays} of tokenAnimationData) {
|
|
||||||
token._noAnimate = true;
|
|
||||||
}
|
|
||||||
const animate = !game.keyboard.isDown("Alt");
|
const animate = !game.keyboard.isDown("Alt");
|
||||||
const startWaypoint = animate ? 0 : tokenAnimationData[0].rays.length - 1;
|
const startWaypoint = animate ? 0 : tokenAnimationData[0].rays.length - 1;
|
||||||
for (let i = startWaypoint;i < tokenAnimationData[0].rays.length; i++) {
|
for (let i = startWaypoint;i < tokenAnimationData[0].rays.length; i++) {
|
||||||
@@ -85,9 +82,6 @@ async function animateTokens(tokens, draggedToken, draggedRays, wasPaused) {
|
|||||||
if (animate)
|
if (animate)
|
||||||
await Promise.all(tokenPaths.map(({token, path}) => token.animateMovement(path)));
|
await Promise.all(tokenPaths.map(({token, path}) => token.animateMovement(path)));
|
||||||
}
|
}
|
||||||
for (const {token} of tokenAnimationData) {
|
|
||||||
token._noAnimate = false;
|
|
||||||
}
|
|
||||||
trackRays(tokens, tokenAnimationData.map(({rays}) => rays)).then(() => recalculate(tokens));
|
trackRays(tokens, tokenAnimationData.map(({rays}) => rays)).then(() => recalculate(tokens));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user