Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomityGuy committed Oct 28, 2022
1 parent f2d2890 commit 2d7a466
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ export class Level extends Scheduler {
else this.rewind.rewindManager.pushFrame(this.rewind.getCurrentFrame(this.deltaMsAccumulator));
}

if (this.rewinding && !playReplay && this.finishTime === null) {
if (this.rewinding && !playReplay && !state.menu.finishScreen.showing) {
this.rewind.rewindFrame(null);
this.updateUI();
}
Expand Down Expand Up @@ -1617,7 +1617,7 @@ export class Level extends Scheduler {
resetPressedFlag('use');
resetPressedFlag('jump');
resetPressedFlag('restart');
});
}, 'finishSchedule');
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/ts/rewind/rewind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ export class Rewind {
level.checkpointBlast = framedata.checkpointBlast;
level.respawnTimes = framedata.respawnTimes;

if (level.finishTime !== null) {
level.finishTime = null;
level.clearScheduleId('finishSchedule');
}

marble.body.position.copy(framedata.position);
marble.body.orientation.copy(framedata.rotation);
marble.body.linearVelocity.copy(framedata.velocity);
Expand Down
1 change: 1 addition & 0 deletions src/ts/ui/options_mbp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export class MbpOptionsScreen extends OptionsScreen {
this.addHeading(this.generalContainer, "Rewind");
this.addSlider(this.generalContainer, "rewindTimescale", "Timescale", 0.1, 1, undefined, undefined, 0.09, (x) => (Math.ceil(x * 10) / 10).toString(), true);
this.addDropdown(this.generalContainer, "rewindMatchFPS", "Match FPS", ["Disabled", "Enabled"], true);
this.addHotkey(this.generalContainer, "rewind");

this.addHeading(this.generalContainer, 'Touch Controls');

Expand Down

0 comments on commit 2d7a466

Please sign in to comment.