This commit is contained in:
Brant Martin
2018-10-08 18:00:55 -04:00

View File

@@ -24,6 +24,7 @@ using Torch.Server.Managers;
using Torch.Utils;
using VRage;
using VRage.Dedicated;
using VRage.Dedicated.RemoteAPI;
using VRage.GameServices;
using VRage.Steam;
using Timer = System.Threading.Timer;
@@ -122,6 +123,11 @@ namespace Torch.Server
_hasRun = true;
Log.Info("Starting server.");
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
if (MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
{
var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
Log.Info($"Remote API started on port {myRemoteServer.Port}");
}
_uptime = Stopwatch.StartNew();
base.Start();