bugfix again

This commit is contained in:
biglyderv 2024-11-25 14:14:20 -05:00
parent 03bb36be88
commit 635c5d577c

View file

@ -122,6 +122,7 @@ class Game extends GameBasic {
let { player } = this; let { player } = this;
if (player.health <= 0) { if (player.health <= 0) {
let that = this;
this.ws.close(); this.ws.close();
this.ws = new WebSocket(origin); this.ws = new WebSocket(origin);
this.ws.addEventListener('message', function (e) { that.recv(e) }); this.ws.addEventListener('message', function (e) { that.recv(e) });