Disable MP sync report generation by default.

A new Server.EnableSyncReports option is provided
so that server operators can restore them remotely
in the event of a future desync bug.
This commit is contained in:
Paul Chote
2018-11-25 21:59:36 +00:00
committed by reaperrr
parent 081182b60f
commit cc707f0037
4 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;
namespace OpenRA.Network
{
@@ -67,7 +68,7 @@ namespace OpenRA.Network
// Generating sync reports is expensive, so only do it if we have
// other players to compare against if a desync did occur
generateSyncReport = !(Connection is ReplayConnection) && LobbyInfo.NonBotClients.Count() > 1;
generateSyncReport = !(Connection is ReplayConnection) && LobbyInfo.GlobalSettings.EnableSyncReports;
NetFrameNumber = 1;
for (var i = NetFrameNumber; i <= FramesAhead; i++)

View File

@@ -201,6 +201,7 @@ namespace OpenRA.Network
public bool AllowVersionMismatch;
public string GameUid;
public bool EnableSingleplayer;
public bool EnableSyncReports;
public bool Dedicated;
[FieldLoader.Ignore]

View File

@@ -157,6 +157,7 @@ namespace OpenRA.Server
Map = settings.Map,
ServerName = settings.Name,
EnableSingleplayer = settings.EnableSingleplayer || !dedicated,
EnableSyncReports = settings.EnableSyncReports,
GameUid = Guid.NewGuid().ToString(),
Dedicated = dedicated
}

View File

@@ -74,6 +74,9 @@ namespace OpenRA
[Desc("Query map information from the Resource Center if they are not available locally.")]
public bool QueryMapRepository = true;
[Desc("Enable client-side report generation to help debug desync errors.")]
public bool EnableSyncReports = false;
public string TimestampFormat = "s";
public ServerSettings Clone()