Merge pull request #3938 from Mailaender/game-id

Added a Game ID and print it to syncreport.log
This commit is contained in:
Paul Chote
2013-10-17 22:51:27 -07:00
4 changed files with 28 additions and 1 deletions

View File

@@ -138,11 +138,13 @@ namespace OpenRA.Network
public int StartingCash = 5000;
public string StartingUnitsClass = "none";
public bool AllowVersionMismatch;
public string GameUid;
}
public Session(string[] mods)
{
this.GlobalSettings.Mods = mods.ToArray();
this.GlobalSettings.GameUid = System.Guid.NewGuid().ToString();
}
public string Serialize()

View File

@@ -178,6 +178,9 @@ namespace OpenRA.Network
{
if (r.Frame == frame)
{
Log.Write("sync", "Player: {0} ({1} {2} {3})", Game.Settings.Player.Name, Platform.CurrentPlatform, Environment.OSVersion, Platform.RuntimeVersion);
var mod = Game.CurrentMods.First().Value;
Log.Write("sync", "Game ID: {0} (Mod: {1} at Version {2})", orderManager.LobbyInfo.GlobalSettings.GameUid, mod.Title, mod.Version);
Log.Write("sync", "Sync for net frame {0} -------------", r.Frame);
Log.Write("sync", "SharedRandom: {0} (#{1})", r.SyncedRandom, r.TotalCount);
Log.Write("sync", "Synced Traits:");