Update v0.6.4.1 - Small hotfix to resolve issues with the hovering tooltip

archived
peshomir 2024-05-20 18:38:54 +03:00
parent 0e4ecbb36f
commit 9e45327969
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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) }
});
});