diff options
| author | RblSb <msrblsb@gmail.com> | 2021-09-27 20:56:03 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2021-12-11 14:05:11 +0300 |
| commit | 68488f8401e1b6a3bcc15033fde09319fc7ec64b (patch) | |
| tree | 7c72d0161bb55210b478a7b1d06aa66cdb27bcf1 /res/client.js | |
| parent | 3873224e8b764e4507fb127603314ed5412ead81 (diff) | |
Add rewind latency
Diffstat (limited to 'res/client.js')
| -rw-r--r-- | res/client.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/res/client.js b/res/client.js index 5ad7ebf..2f73059 100644 --- a/res/client.js +++ b/res/client.js @@ -1530,7 +1530,11 @@ client_Main.prototype = { if(Math.abs(time - newTime) < synchThreshold) { return; } - this.player.setTime(newTime); + if(!data.getTime.paused) { + this.player.setTime(newTime + 0.5); + } else { + this.player.setTime(newTime); + } break; case "KickClient": this.disabledReconnection = true; @@ -1590,7 +1594,7 @@ client_Main.prototype = { } break; case "Rewind": - this.player.setTime(data.rewind.time); + this.player.setTime(data.rewind.time + 0.5); break; case "ServerMessage": var id = data.serverMessage.textId; |
