mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
fix: cyclist.now() should return 0 when stopped
This commit is contained in:
parent
060d2cfe2b
commit
14b1a1203f
@ -67,6 +67,9 @@ export class Cyclist {
|
||||
);
|
||||
}
|
||||
now() {
|
||||
if (!this.started) {
|
||||
return 0;
|
||||
}
|
||||
const secondsSinceLastTick = this.getTime() - this.lastTick - this.clock.duration;
|
||||
return this.lastBegin + secondsSinceLastTick * this.cps; // + this.clock.minLatency;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user