hopefully fixes negative coal bug

This commit is contained in:
circle-gon 2022-12-09 02:34:47 +00:00
parent c80dcffaee
commit 6be17f68ec

View file

@ -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);