From 7ab6ed52626554208ad4e7155c69e104a72ab4f9 Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 8 Dec 2023 19:31:22 +0100 Subject: [PATCH] crashing the server is not smart --- public_html/js/global.js | 1 - public_html/js/input.js | 2 +- public_html/js/sound.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public_html/js/global.js b/public_html/js/global.js index 93d784b..95ee543 100644 --- a/public_html/js/global.js +++ b/public_html/js/global.js @@ -17,7 +17,6 @@ let bulletSound = new Sound("./assets/sounds/shoot.mp3"); let driftSound = new Sound("./assets/sounds/drift.mp3"); let net = new Network("wss://ws.gta6.insat.fr:8080?name="+CookiePseudo()); let inp = new Input("canvas"); -let date = new Date(); let bullets = []; let circles = []; let squares = []; diff --git a/public_html/js/input.js b/public_html/js/input.js index f7b3716..cfccfbd 100644 --- a/public_html/js/input.js +++ b/public_html/js/input.js @@ -73,7 +73,7 @@ class Input { if(oldDir!=this.dir) { player.changeDirection(this.dir); - net.update(this.player); + net.update(player); } } diff --git a/public_html/js/sound.js b/public_html/js/sound.js index 6aed892..76ae72b 100644 --- a/public_html/js/sound.js +++ b/public_html/js/sound.js @@ -5,7 +5,7 @@ class Sound{ } play(){ - this.sound.pause() + //this.sound.pause() this.sound.currentTime=0; this.sound.play() }