Fix syncreport crash caused by getting LocalClient index from ReplayConnection

This commit is contained in:
dnqbob
2022-12-10 10:49:12 +08:00
committed by Gustas
parent 6fccd6be84
commit 45d4a2c7e2

View File

@@ -104,7 +104,10 @@ namespace OpenRA.Network
internal void DumpSyncReport(int frame)
{
var reportName = "syncreport-" + DateTime.UtcNow.ToString("yyyy-MM-ddTHHmmssZ", CultureInfo.InvariantCulture) + "-" + orderManager.LocalClient.Index + ".log";
var timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHHmmssZ", CultureInfo.InvariantCulture);
var reportName = $"syncreport-{timestamp}-{orderManager.LocalClient?.Index}.log";
Log.AddChannel("sync", reportName);
var recordedFrames = new List<int>();