Skip to content

Commit 6a966df

Browse files
committed
attempt to fix waypoint position
1 parent a380fd6 commit 6a966df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/js/utils.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export function translateCoords(x, z, hellTranslate, offset = 0) {
1919
return [(z * - 1) + offset, x + offset]
2020
}
2121

22-
export function reverseTranslateCoords(z, x, hellTranslate, offset = 0) {
22+
export function reverseTranslateCoords(z, x, hellTranslate) {
2323
if (hellTranslate) {
24-
x = Math.floor(x * 8)
25-
z = Math.floor(z * 8)
24+
x = x << 3
25+
z = z << 3
2626
}
2727

28-
return [x - offset, (z * - 1) - offset]
28+
return [x, z]
2929
}

0 commit comments

Comments
 (0)