From 364691240f7f4f957d2138b410df2b7cca3edecc Mon Sep 17 00:00:00 2001 From: evanpelle Date: Sat, 12 Oct 2024 18:23:33 -0700 Subject: [PATCH] fix bug: join public lobby and then select single player --- src/client/Client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/Client.ts b/src/client/Client.ts index 37b545d7f..18198a4c1 100644 --- a/src/client/Client.ts +++ b/src/client/Client.ts @@ -66,6 +66,9 @@ class Client { this.ip ]); console.log(`got ip ${clientIP}`) + if (this.game != null) { + this.game.stop() + } this.game = createClientGame( event.detail.singlePlayer, (): string => {return this.usernameInput.getCurrentUsername()},