Add back ticks after flagging

The ticks are necessary to trigger repeated onFlag
checks on server :-\

Fixes #5213
pull/5217/head
Isaac Levy 2019-06-22 14:07:46 -04:00
parent 4cdcfaddb7
commit 8567272f56
1 changed files with 4 additions and 6 deletions

View File

@ -149,13 +149,11 @@ export class ClockController {
if (color === undefined) return;
const now = nowFun();
const millis = this.times[color] - this.elapsed(now);
const millis = Math.max(0, this.times[color] - this.elapsed(now));
if (millis <= 0) this.opts.onFlag();
else {
this.scheduleTick(millis, 0);
updateElements(this, this.elements[color], millis);
}
this.scheduleTick(millis, 0);
if (millis === 0) this.opts.onFlag();
else updateElements(this, this.elements[color], millis);
if (this.opts.soundColor === color) {
if (this.emergSound.playable[color]) {