fix bug change username after join lobby

This commit is contained in:
evanpelle
2024-09-29 11:26:31 -07:00
parent 801c6627eb
commit 973b9c5e10
6 changed files with 9 additions and 20 deletions
+1 -3
View File
@@ -17,7 +17,7 @@ import {placeName} from "./graphics/NameBoxCalculator";
export function createClientGame(playerName: string, clientID: ClientID, playerID: PlayerID, ip: string | null, gameID: GameID, config: Config, terrainMap: TerrainMap): ClientGame {
export function createClientGame(playerName: () => string, clientID: ClientID, playerID: PlayerID, ip: string | null, gameID: GameID, config: Config, terrainMap: TerrainMap): ClientGame {
let eventBus = new EventBus()
let game = createGame(terrainMap, eventBus, config)
@@ -32,7 +32,6 @@ export function createClientGame(playerName: string, clientID: ClientID, playerI
return new ClientGame(
playerName,
clientID,
playerID,
ip,
@@ -59,7 +58,6 @@ export class ClientGame {
constructor(
public playerName: string,
private id: ClientID,
private playerID: PlayerID,
private clientIP: string | null,