Merge branch 'dev' of https://github.com/Regalis11/Barotrauma into unstable
This commit is contained in:
@@ -157,9 +157,9 @@ namespace Barotrauma
|
||||
string password = "";
|
||||
bool enableUpnp = false;
|
||||
|
||||
int maxPlayers = 10;
|
||||
int? ownerKey = null;
|
||||
UInt64 steamId = 0;
|
||||
int maxPlayers = 10;
|
||||
Option<int> ownerKey = Option<int>.None();
|
||||
Option<SteamId> steamId = Option<SteamId>.None();
|
||||
IPAddress listenIp = IPAddress.Any;
|
||||
|
||||
XDocument doc = XMLExtensions.TryLoadXml(ServerSettings.SettingsFile);
|
||||
@@ -176,7 +176,7 @@ namespace Barotrauma
|
||||
password = doc.Root.GetAttributeString("password", "");
|
||||
enableUpnp = doc.Root.GetAttributeBool("enableupnp", false);
|
||||
maxPlayers = doc.Root.GetAttributeInt("maxplayers", 10);
|
||||
ownerKey = null;
|
||||
ownerKey = Option<int>.None();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
@@ -231,12 +231,12 @@ namespace Barotrauma
|
||||
case "-ownerkey":
|
||||
if (int.TryParse(CommandLineArgs[i + 1], out int key))
|
||||
{
|
||||
ownerKey = key;
|
||||
ownerKey = Option<int>.Some(key);
|
||||
}
|
||||
i++;
|
||||
break;
|
||||
case "-steamid":
|
||||
UInt64.TryParse(CommandLineArgs[i + 1], out steamId);
|
||||
steamId = SteamId.Parse(CommandLineArgs[i + 1]);
|
||||
i++;
|
||||
break;
|
||||
case "-pipes":
|
||||
@@ -257,6 +257,7 @@ namespace Barotrauma
|
||||
maxPlayers,
|
||||
ownerKey,
|
||||
steamId);
|
||||
Server.StartServer();
|
||||
|
||||
for (int i = 0; i < CommandLineArgs.Length; i++)
|
||||
{
|
||||
@@ -288,7 +289,7 @@ namespace Barotrauma
|
||||
|
||||
public void CloseServer()
|
||||
{
|
||||
Server?.Disconnect();
|
||||
Server?.Quit();
|
||||
ShouldRun = false;
|
||||
Server = null;
|
||||
}
|
||||
@@ -345,7 +346,7 @@ namespace Barotrauma
|
||||
if (Server == null) { break; }
|
||||
SteamManager.Update((float)Timing.Step);
|
||||
TaskPool.Update();
|
||||
CoroutineManager.Update((float)Timing.Step, (float)Timing.Step);
|
||||
CoroutineManager.Update(paused: false, (float)Timing.Step);
|
||||
|
||||
GameMain.LuaCs.Update();
|
||||
GameMain.LuaCs.Hook.Call("think", new object[] { });
|
||||
|
||||
Reference in New Issue
Block a user