From 11df0216e57f2747d9232ec78102f7db57efad85 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 18 Feb 2017 11:30:27 +0000 Subject: [PATCH] Remove legacy restart behaviour. --- OpenRA.Game/Game.cs | 5 ----- OpenRA.Game/Support/Program.cs | 7 +------ OpenRA.GameMonitor/GameMonitor.cs | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 48e6908ea8..08552c0127 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -803,11 +803,6 @@ namespace OpenRA state = RunStatus.Success; } - public static void Restart() - { - state = RunStatus.Restart; - } - public static void AddChatLine(Color color, string name, string text) { OrderManager.AddChatLine(color, name, text); diff --git a/OpenRA.Game/Support/Program.cs b/OpenRA.Game/Support/Program.cs index f0f52841fd..b328aa5aed 100644 --- a/OpenRA.Game/Support/Program.cs +++ b/OpenRA.Game/Support/Program.cs @@ -22,7 +22,6 @@ namespace OpenRA { Error = -1, Success = 0, - Restart = 1, Running = int.MaxValue } @@ -131,11 +130,7 @@ namespace OpenRA { Game.Initialize(new Arguments(args)); GC.Collect(); - var status = Game.Run(); - if (status == RunStatus.Restart) - using (var p = Process.GetCurrentProcess()) - Process.Start(Assembly.GetEntryAssembly().Location, p.StartInfo.Arguments); - return status; + return Game.Run(); } } } \ No newline at end of file diff --git a/OpenRA.GameMonitor/GameMonitor.cs b/OpenRA.GameMonitor/GameMonitor.cs index c730795408..d153ee6737 100644 --- a/OpenRA.GameMonitor/GameMonitor.cs +++ b/OpenRA.GameMonitor/GameMonitor.cs @@ -116,7 +116,7 @@ namespace OpenRA static void GameProcessExited(object sender, EventArgs e) { - if (!(gameProcess.ExitCode == (int)RunStatus.Success || gameProcess.ExitCode == (int)RunStatus.Restart)) + if (gameProcess.ExitCode != (int)RunStatus.Success) ShowErrorDialog(); Exit();