diff --git a/game.js b/game.js index 027cdd2..2159ded 100644 --- a/game.js +++ b/game.js @@ -203,7 +203,7 @@ class Game extends GameBasic { that.entities.push(new NPC(false, that)) } - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 103; i++) { that.entities.push(new Shooter(false, that)) } diff --git a/static/js/index.js b/static/js/index.js index 9236df7..18c94c9 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -281,12 +281,13 @@ class Game extends GameBasic { this.ws = new WebSocket(origin); + setInterval(function () { that.sync() }, 1000 / 15); + this.opener = function (that) { that.sync(true); if (tok) { that.ws.send(JSON.stringify(["AUTH", tok])); } - setInterval(function () { that.sync() }, 1000 / 5); that.ws.addEventListener('message', function (e) { that.recv(e) }); };