]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Hotfix: Set round end information for replays back to null on round start instead...
authorVasilis <vasilis@pikachu.systems>
Tue, 20 Feb 2024 01:36:13 +0000 (02:36 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 01:36:13 +0000 (02:36 +0100)
* Hotfix

* I dont think i need this now

Content.Server/GameTicking/GameTicker.Replays.cs

index f23482585cc37f929a55f63a82d25a2c2defb978..cbeac793b658fcb3a96da61ebd073b93b56ad5a7 100644 (file)
@@ -48,6 +48,10 @@ public sealed partial class GameTicker
             var tempDir = _cfg.GetCVar(CCVars.ReplayAutoRecordTempDir);
             ResPath? moveToPath = null;
 
+            // Set the round end player and text back to null to prevent it from writing the previous round's data.
+            _replayRoundPlayerInfo = null;
+            _replayRoundText = null;
+
             if (!string.IsNullOrEmpty(tempDir))
             {
                 var baseReplayPath = new ResPath(_cfg.GetCVar(CVars.ReplayDirectory)).ToRootedPath();
@@ -124,9 +128,6 @@ public sealed partial class GameTicker
         metadata["roundEndPlayers"] = _serialman.WriteValue(_replayRoundPlayerInfo);
         metadata["roundEndText"] = new ValueDataNode(_replayRoundText);
         metadata["server_id"] = new ValueDataNode(_configurationManager.GetCVar(CCVars.ServerId));
-        // These should be set to null to prepare them for the next round.
-        _replayRoundPlayerInfo = null;
-        _replayRoundText = null;
     }
 
     private ResPath GetAutoReplayPath()