X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=5471a3fefcc1c448f08cdc08afdd36a78889a69e;hb=421bdcd4dfe845a4714416606e72e086e7860e2b;hp=6c289e61be7fa380368d30a16b98a8194d8699df;hpb=1051336271ad4d4128ef1f66953f54973601d774;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 6c289e61..5471a3fe 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -517,8 +517,10 @@ export default { if (L >= 1) { const gameLastupdate = game.moves[L-1].played; game.initime[L % 2] = gameLastupdate; - if (L >= 2) - game.clocks[L % 2] = Date.now() - gameLastupdate; + if (L >= 2) { + game.clocks[L % 2] = + tc.mainTime - (Date.now() - gameLastupdate) / 1000; + } } } // Sort chat messages from newest to oldest