core: Recompute next tick time of timers when they are reset
This commit is contained in:
parent
6d577f50e4
commit
1b17cbb9b9
|
@ -278,6 +278,7 @@ impl<'gc> Timers<'gc> {
|
||||||
if let Some(mut timer) = timer {
|
if let Some(mut timer) = timer {
|
||||||
self.remove(id);
|
self.remove(id);
|
||||||
timer.interval = interval;
|
timer.interval = interval;
|
||||||
|
timer.tick_time = self.cur_time + interval;
|
||||||
self.timers.push(timer);
|
self.timers.push(timer);
|
||||||
} else {
|
} else {
|
||||||
panic!("Changing delay of non-existent timer");
|
panic!("Changing delay of non-existent timer");
|
||||||
|
|
Loading…
Reference in New Issue