Skip to content

Commit 861fab1

Browse files
committed
fix: Interop with TAS Recorder
1 parent d455e92 commit 861fab1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CelesteTAS-EverestInterop/Source/Communication/CommunicationAdapterCeleste.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ private void ProcessRecordTAS(string fileName) {
345345
}
346346

347347
Manager.AddMainThreadAction(() => {
348+
Manager.DisableRun();
348349
Manager.Controller.RefreshInputs();
349350
if (RecordingCommand.RecordingTimes.IsNotEmpty()) {
350351
AbortTas("Can't use StartRecording/StopRecording with \"Record TAS\"");

CelesteTAS-EverestInterop/Source/TAS/Input/Commands/RecordingCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ private static void StartRecording(CommandLine commandLine, int studioLine, stri
6464
}
6565

6666
Manager.CurrState = Manager.NextState = Manager.State.Running;
67+
Manager.PlaybackSpeed = 1.0f;
6768
}
6869
}
6970

CelesteTAS-EverestInterop/Source/TAS/Manager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static void Initialize() {
5555

5656
public static bool Running => CurrState != State.Disabled;
5757
public static bool FastForwarding => Running && PlaybackSpeed >= 5.0f;
58-
public static float PlaybackSpeed { get; private set; } = 1.0f;
58+
public static float PlaybackSpeed { get; internal set; } = 1.0f;
5959

6060
public static State CurrState, NextState;
6161
public static readonly InputController Controller = new();
@@ -279,7 +279,7 @@ public static void UpdateMeta() {
279279
return;
280280
}
281281

282-
if (TASRecorderInterop.IsRecording) {
282+
if (Running && TASRecorderInterop.IsRecording) {
283283
// Force recording at 1x playback
284284
NextState = State.Running;
285285
PlaybackSpeed = 1.0f;

0 commit comments

Comments
 (0)