Skip to content

Commit

Permalink
studio: Play to the end when stop frame is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Jul 23, 2023
1 parent 2e3579d commit 56f3cf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/tas_studio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,10 @@ pub unsafe fn on_tas_playback_frame(
let _ = editor.apply_accurate_frame(accurate_frame);
editor.recompute_extra_camera_frame_data_if_needed();

if *frames_played == editor.stop_frame() as usize + 1 {
// If stop_frame is 0, play the whole TAS, as that results in more intuitive
// behavior, and works around a Windows issue where the mouse doesn't work properly
// if you go into TAS editor first thing after launching the game.
if editor.stop_frame() != 0 && *frames_played == editor.stop_frame() as usize + 1 {
stop = true;
}
}
Expand Down

0 comments on commit 56f3cf3

Please sign in to comment.