X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=cb1b720d540e587b378313932c8fe8d1b1ed4029;hp=18a28366f9d1c0d6a2b505c2962cb297a1329097;hb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;hpb=afbf3ca7151ef15a9e579b0f913683ab212396c4 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 18a28366..cb1b720d 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -938,14 +938,9 @@ export default { if (game.score == "*") { // Set clocks + initime game.initime = [0, 0]; - if (L >= 1) { - const gameLastupdate = game.moves[L-1].played; - game.initime[L % 2] = gameLastupdate; - if (L >= 2) { - game.clocks[L % 2] = - tc.mainTime - (Date.now() - gameLastupdate) / 1000; - } - } + if (L >= 1) game.initime[L % 2] = game.moves[L-1].played; + // NOTE: game.clocks shouldn't be computed right now: + // job will be done in re_setClocks() called soon below. } // Sort chat messages from newest to oldest game.chats.sort((c1, c2) => {