mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-21 20:55:12 -04:00
fix: cyclist.now() should return 0 when stopped
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user