Skip to content

Commit

Permalink
Fix syncreport crash caused by getting LocalClient index from ReplayC…
Browse files Browse the repository at this point in the history
…onnection
  • Loading branch information
dnqbob authored and PunkPun committed Dec 11, 2022
1 parent 6fccd6b commit 45d4a2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenRA.Game/Network/SyncReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ void GenerateSyncReport(Report report, IEnumerable<OrderManager.ClientOrder> ord

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

0 comments on commit 45d4a2c

Please sign in to comment.