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
This commit is contained in:
Vasilis
2024-02-20 02:36:13 +01:00
committed by GitHub
parent db809a27f4
commit 2548b13abf

View 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()