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