Skip to content

Commit

Permalink
fix: fixed client removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Picoseconds committed Aug 7, 2020
1 parent 23fbcf7 commit 89611e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/moomoo/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 89611e4

Please sign in to comment.