Resume Round: preserve current timer value instead of restarting from set value
This commit is contained in:
@@ -423,11 +423,11 @@ function toggleRound(){
|
|||||||
|
|
||||||
function resumeRound(){
|
function resumeRound(){
|
||||||
ws_send({type:'resume_round'});
|
ws_send({type:'resume_round'});
|
||||||
// If linked (toggle ON) and timer stopped, resume it
|
// If linked (toggle ON) and timer stopped, resume it (preserve current value)
|
||||||
if(document.getElementById('timer-tog').checked && !modTimerRunning){
|
if(document.getElementById('timer-tog').checked && !modTimerRunning){
|
||||||
modTimerLoad();
|
|
||||||
modTimerRunning=true;
|
modTimerRunning=true;
|
||||||
document.getElementById('btn-timer-ss').textContent='PAUSE';
|
document.getElementById('btn-timer-ss').textContent='PAUSE';
|
||||||
|
broadcastTimerToPlayers(modTimerRemaining,true);
|
||||||
modTimerInterval=setInterval(()=>{
|
modTimerInterval=setInterval(()=>{
|
||||||
modTimerRemaining--;
|
modTimerRemaining--;
|
||||||
renderModTimerDisplay();
|
renderModTimerDisplay();
|
||||||
|
|||||||
Reference in New Issue
Block a user