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:
@@ -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++)
|
||||
|
||||
@@ -201,6 +201,7 @@ namespace OpenRA.Network
|
||||
public bool AllowVersionMismatch;
|
||||
public string GameUid;
|
||||
public bool EnableSingleplayer;
|
||||
public bool EnableSyncReports;
|
||||
public bool Dedicated;
|
||||
|
||||
[FieldLoader.Ignore]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user