mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Fixed beastforms getting stuck
This commit is contained in:
parent
3b7b6258a1
commit
f4ce452ecf
2 changed files with 28 additions and 12 deletions
|
|
@ -66,12 +66,20 @@ export default class BeastformEffect extends BaseEffect {
|
|||
};
|
||||
|
||||
const updateToken = token => {
|
||||
const { x, y } = game.system.api.documents.DhToken.getSnappedPositionInSquareGrid(
|
||||
token.object.scene.grid,
|
||||
{ x: token.x, y: token.y, elevation: token.elevation },
|
||||
baseUpdate.width,
|
||||
baseUpdate.height
|
||||
);
|
||||
let x = null,
|
||||
y = null;
|
||||
if (token.object?.scene?.grid) {
|
||||
const positionData = game.system.api.documents.DhToken.getSnappedPositionInSquareGrid(
|
||||
token.object.scene.grid,
|
||||
{ x: token.x, y: token.y, elevation: token.elevation },
|
||||
baseUpdate.width,
|
||||
baseUpdate.height
|
||||
);
|
||||
|
||||
x = positionData.x;
|
||||
y = positionData.y;
|
||||
}
|
||||
|
||||
return {
|
||||
...baseUpdate,
|
||||
x,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue