From 56f3cf3e16146b32f106c74b2a75f672be48655b Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 23 Jul 2023 11:03:24 +0400 Subject: [PATCH] studio: Play to the end when stop frame is 0 --- src/modules/tas_studio/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/tas_studio/mod.rs b/src/modules/tas_studio/mod.rs index 207cea1..8478f72 100644 --- a/src/modules/tas_studio/mod.rs +++ b/src/modules/tas_studio/mod.rs @@ -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; } }