can leave lobby

This commit is contained in:
evanpelle
2024-08-25 09:33:58 -07:00
parent 2d7d4875f7
commit 6f1848dbc7
7 changed files with 61 additions and 80 deletions
+1
View File
@@ -43,6 +43,7 @@ export class GameServer {
}
}
if (clientMsg.type == "leave") {
// TODO: get rid of leave message, just use on close?
const toRemove = this.clients.filter(c => c.id)
if (toRemove.length == 0) {
return