From 2548b13abf882a33ef3bf98c79ddaf91eddfa956 Mon Sep 17 00:00:00 2001 From: Vasilis Date: Tue, 20 Feb 2024 02:36:13 +0100 Subject: [PATCH] Hotfix: Set round end information for replays back to null on round start instead of round end (#25394) * Hotfix * I dont think i need this now --- Content.Server/GameTicking/GameTicker.Replays.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameTicking/GameTicker.Replays.cs b/Content.Server/GameTicking/GameTicker.Replays.cs index f23482585c..cbeac793b6 100644 --- a/Content.Server/GameTicking/GameTicker.Replays.cs +++ b/Content.Server/GameTicking/GameTicker.Replays.cs @@ -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() -- 2.51.2