From 89611e49752068ac30dd4bc1c861f843ae4fcc31 Mon Sep 17 00:00:00 2001 From: Picoseconds Date: Fri, 7 Aug 2020 15:53:08 -0600 Subject: [PATCH] fix: fixed client removal --- src/moomoo/Game.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/moomoo/Game.ts b/src/moomoo/Game.ts index 9e74a9a..328dfd4 100755 --- a/src/moomoo/Game.ts +++ b/src/moomoo/Game.ts @@ -143,11 +143,11 @@ export default class Game { if (tribeIndex > -1) this.state.removeTribe(tribeIndex); - - let clientIndex = this.clients.indexOf(client); - if (clientIndex > -1) - this.clients.splice(clientIndex, 1); } + + let clientIndex = this.clients.indexOf(client); + if (clientIndex > -1) + this.clients.splice(clientIndex, 1); }); socket.addListener("message", (msg) => {