diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs index b0011ae680..ce305978fb 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs @@ -174,7 +174,7 @@ namespace BizHawk.Client.EmuHawk } if (f < Tastudio.CurrentTasMovie.InputLogLength && f>=0) { - Tastudio.GoToFrame(f); + Tastudio.GoToFrame(f,true); } } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs index e0f421f8f8..01c799e8ef 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs @@ -30,7 +30,7 @@ namespace BizHawk.Client.EmuHawk } // SuuperW: I changed this to public so that it could be used by MarkerControl.cs - public void GoToFrame(int frame) + public void GoToFrame(int frame, bool fromLua = false) { // If seeking to a frame before or at the end of the movie, use StartAtNearestFrameAndEmulate // Otherwise, load the latest state (if not already there) and seek while recording. @@ -38,7 +38,7 @@ namespace BizHawk.Client.EmuHawk if (frame <= CurrentTasMovie.InputLogLength) { // Get as close as we can then emulate there - StartAtNearestFrameAndEmulate(frame); + StartAtNearestFrameAndEmulate(frame, fromLua); MaybeFollowCursor(); } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index bbb0632837..43af63fe6b 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -805,7 +805,7 @@ namespace BizHawk.Client.EmuHawk //_autoRestoreFrame = null; } - private void StartAtNearestFrameAndEmulate(int frame) + private void StartAtNearestFrameAndEmulate(int frame, bool fromLua) { if (frame == Emulator.Frame) return; @@ -825,6 +825,16 @@ namespace BizHawk.Client.EmuHawk { StartSeeking(frame); } + else + { + if (_wasRecording) + { + //lua botting users will want to re-activate record mode automatically -- it should be like nothing ever happened + //GUI users on the other hand need to be protected from clobbering their video when skipping around + if(fromLua) + TastudioRecordMode(); + } + } } }