reduce data sent to clients

This commit is contained in:
Zutatensuppe 2020-12-24 15:29:32 +01:00
parent cac1f02557
commit 1025d42ea2
4 changed files with 63 additions and 46 deletions

View file

@ -368,12 +368,10 @@ async function main() {
if (MODE === 'play') {
const game = await Communication.connect(gameId, CLIENT_ID)
game.rng.obj = Rng.unserialize(game.rng.obj)
Game.newGame(game)
Game.newGame(Util.decodeGame(game))
} else if (MODE === 'replay') {
const {game, log} = await Communication.connectReplay(gameId, CLIENT_ID)
game.rng.obj = Rng.unserialize(game.rng.obj)
Game.newGame(game)
Game.newGame(Util.decodeGame(game))
GAME_LOG = log
lastRealTime = Util.timestamp()
GAME_START_TS = GAME_LOG[0][GAME_LOG[0].length - 1]