diff --git a/build.js b/build.js index 313a397..2a16e1f 100644 --- a/build.js +++ b/build.js @@ -336,6 +336,7 @@ replaceOne(new RegExp(`,${dictionary.playerBalances}=new Uint32Array\\(\\w+\\),` `hoveringTooltip.display = function(mouseX, mouseY) { var coordX = aj.fU(mouseX), coordY = aj.fW(mouseY), coord = aj.fY(coordX, coordY), point = aj.fa(coord); + if (coordX < 0 || coordY < 0) return; k.vQ(point); } this.click = function(g8, g9, tE) { @@ -346,6 +347,8 @@ replaceOne(new RegExp(`,${dictionary.playerBalances}=new Uint32Array\\(\\w+\\),` return !(!aj.fb(fT, fV) || (fT = (b7.cv.fv() ? .025 : .0144) * aK.fw, fV = performance.now(), Math.abs(g8 - uu) > fT) || Math.abs(g9 - uv) > fT || dY + 500 < fV) && (dY = fV, tE ? (function(g8, g9, fZ) { a2.eb(fZ) || -1 === (g8 = ak.ff.vR(g8, g9)) ? k.vQ(fZ) : k.vS(g8) }(g8, g9, fZ), false)`) + replaceRawCode("aK.nH=(window.devicePixelRatio||1)*aEr,", + `aK.nH = (window.devicePixelRatio || 1) * aEr, hoveringTooltip.canvasPixelScale = aK.nH,`) } // Disable built-in Territorial.io error reporting diff --git a/src/fx_core.js b/src/fx_core.js index 7a80e8a..2caa7d1 100644 --- a/src/fx_core.js +++ b/src/fx_core.js @@ -1,4 +1,4 @@ -const fx_version = '0.6.4'; // FX Client Version +const fx_version = '0.6.4.1'; // FX Client Version const fx_update = 'May 20'; // FX Client Last Updated if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) { @@ -433,10 +433,11 @@ const leaderboardFilter = new (function() { const hoveringTooltip = new (function() { this.display = () => {}; // this gets populated by the modified game script + this.canvasPixelScale = 1; document.getElementById("canvasA").addEventListener("mousemove", e => { if (!settings.hoveringTooltip || !getVar("gameState")) return; try { - this.display(e.clientX, e.clientY); + this.display(this.canvasPixelScale * e.clientX, this.canvasPixelScale * e.clientY); } catch (e) { console.error(e) } }); });