Remove legacy restart behaviour.
This commit is contained in:
@@ -803,11 +803,6 @@ namespace OpenRA
|
|||||||
state = RunStatus.Success;
|
state = RunStatus.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Restart()
|
|
||||||
{
|
|
||||||
state = RunStatus.Restart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void AddChatLine(Color color, string name, string text)
|
public static void AddChatLine(Color color, string name, string text)
|
||||||
{
|
{
|
||||||
OrderManager.AddChatLine(color, name, text);
|
OrderManager.AddChatLine(color, name, text);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
Error = -1,
|
Error = -1,
|
||||||
Success = 0,
|
Success = 0,
|
||||||
Restart = 1,
|
|
||||||
Running = int.MaxValue
|
Running = int.MaxValue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,11 +130,7 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
Game.Initialize(new Arguments(args));
|
Game.Initialize(new Arguments(args));
|
||||||
GC.Collect();
|
GC.Collect();
|
||||||
var status = Game.Run();
|
return Game.Run();
|
||||||
if (status == RunStatus.Restart)
|
|
||||||
using (var p = Process.GetCurrentProcess())
|
|
||||||
Process.Start(Assembly.GetEntryAssembly().Location, p.StartInfo.Arguments);
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
static void GameProcessExited(object sender, EventArgs e)
|
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();
|
ShowErrorDialog();
|
||||||
|
|
||||||
Exit();
|
Exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user