mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 17:31:54 +00:00
hopefully fixes negative coal bug
This commit is contained in:
parent
c80dcffaee
commit
6be17f68ec
1 changed files with 7 additions and 1 deletions
|
@ -80,7 +80,13 @@ function update() {
|
|||
if (!Number.isFinite(player.timePlayed)) {
|
||||
player.timePlayed = 1e308;
|
||||
}
|
||||
globalBus.emit("update", diff, trueDiff);
|
||||
|
||||
let currentTime = trueDiff;
|
||||
while (currentTime > 1) {
|
||||
globalBus.emit("update", diff / trueDiff, 1);
|
||||
currentTime--;
|
||||
}
|
||||
globalBus.emit("update", (diff * currentTime) / trueDiff, currentTime);
|
||||
|
||||
if (settings.unthrottled) {
|
||||
requestAnimationFrame(update);
|
||||
|
|
Loading…
Reference in a new issue