mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-03 18:30:36 +00:00
fixed multiplayer
This commit is contained in:
@@ -86,7 +86,8 @@ class Client {
|
||||
if (this.game != null) {
|
||||
return
|
||||
}
|
||||
this.game = createClientGame(getUsername(), this.random.nextID(), lobbyID, defaultConfig, map)
|
||||
// TODO make id more random, if two player join same millisecond get same id.
|
||||
this.game = createClientGame(getUsername(), new PseudoRandom(Date.now()).nextID(), lobbyID, defaultConfig, map)
|
||||
this.game.joinLobby()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user