From 5a9f1b2cbda5a67daa2d2d8ace2ba1a0c308e362 Mon Sep 17 00:00:00 2001 From: "lime.person" <49272400+LimeSlime888@users.noreply.github.com> Date: Sun, 15 Feb 2026 18:50:20 +0000 Subject: [PATCH] Add support for non-integer coordinate hashes --- frontend/static/yw/javascript/owot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/static/yw/javascript/owot.js b/frontend/static/yw/javascript/owot.js index fcd1414..530c038 100644 --- a/frontend/static/yw/javascript/owot.js +++ b/frontend/static/yw/javascript/owot.js @@ -1703,11 +1703,11 @@ function defaultStyles() { function manageCoordHash() { if(!Permissions.can_go_to_coord(state.userModel, state.worldModel)) return; try { - var coord = window.location.hash.match(/#x:-?\d+,y:-?\d+$/); + var coord = window.location.hash.match(/#x:-?[\d\.]+,y:-?[\d\.]+$/); if(coord) { - coord = window.location.hash.split(/#x:|,y:/).slice(1).map(function(a) { - return parseInt(a, 10); - }); + coord = window.location.hash.split(/#x:|,y:/).slice(1); + coord[0] = parseFloat(coord[0]); + coord[1] = parseFloat(coord[1]); homeX = coord[0]; homeY = coord[1]; w.doGoToCoord(coord[1], coord[0]);