Perform pathfinding on grid-corner to grid-corner basis for tokens with size divisible by two (fixes #144)

This commit is contained in:
Manuel Vögele
2022-01-30 10:51:58 +01:00
parent 1972498b05
commit 7ac1c828b6
3 changed files with 30 additions and 18 deletions
+4
View File
@@ -86,6 +86,10 @@ export function getSnapPointForToken(x, y, token) {
return new PIXI.Point(snapX, snapY);
}
export function getSnapPointForTokenObj(pos, token) {
return getSnapPointForToken(pos.x, pos.y, token);
}
export function getSnapPointForMeasuredTemplate(x, y) {
if (canvas.grid.type === CONST.GRID_TYPES.GRIDLESS) {
return new PIXI.Point(x, y);