From b1de14bc70414234786af81b23b7c7686ad8747c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 13 Sep 2014 18:08:14 +1200 Subject: [PATCH] Disable replay saving for campaign missions. --- OpenRA.Game/Game.cs | 9 ++++++--- OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index a64e52ea41..993902559e 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -43,10 +43,13 @@ namespace OpenRA public static DatabaseReader GeoIpDatabase; - public static OrderManager JoinServer(string host, int port, string password) + public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true) { - var om = new OrderManager(host, port, password, - new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename)); + IConnection connection = new NetworkConnection(host, port); + if (recordReplay) + connection = new ReplayRecorderConnection(connection, ChooseReplayFilename); + + var om = new OrderManager(host, port, password, connection); JoinInner(om); return om; } diff --git a/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs index 8d9ba48cf2..0e01cf9159 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs @@ -104,7 +104,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic }; Game.LobbyInfoChanged += lobbyReady; - om = Game.JoinServer(IPAddress.Loopback.ToString(), Game.CreateLocalServer(selectedMapPreview.Uid), ""); + om = Game.JoinServer(IPAddress.Loopback.ToString(), Game.CreateLocalServer(selectedMapPreview.Uid), "", false); } } }