Fixes for 2017-11-17 major

This commit is contained in:
John Gross
2017-11-17 12:11:11 -08:00
parent c07a01a427
commit 25e6f27854
3 changed files with 10 additions and 6 deletions

View File

@@ -163,6 +163,7 @@ namespace Torch.Server
Log.Info("Starting server.");
MySandboxGame.IsDedicated = true;
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
Environment.SetEnvironmentVariable("SteamAppId", MyPerServerSettings.AppId.ToString());
VRage.Service.ExitListenerSTA.OnExit += delegate { MySandboxGame.Static?.Exit(); };
@@ -309,6 +310,7 @@ namespace Torch.Server
var exe = Assembly.GetExecutingAssembly().Location;
((TorchConfig)Config).WaitForPID = Process.GetCurrentProcess().Id.ToString();
Process.Start(exe, Config.ToString());
Stop();
Environment.Exit(0);
}