fix : tp cheat

This commit is contained in:
Baptiste 2024-12-17 18:39:33 +01:00
parent d520ccca1d
commit 2547109e4a

View file

@ -223,7 +223,7 @@ setInterval(() => {
}
}, 100);
document.getElementById("canvas").addEventListener("contextmenu", (e) => {
if(tp) {
if(cheat_tp) {
e.preventDefault();
let bounds = this.canvas.getBoundingClientRect();
player.x=(e.clientX - bounds.x)*document.getElementById("canvas").width/bounds.width;