Dedicated server loads the name, password and other initial settings from the serversettings file. + Fixed not being able to change the server name if the current name is null or empty

This commit is contained in:
Joonas Rikkonen
2017-07-03 18:28:23 +03:00
parent 8e880b2ded
commit 0d7851367b
5 changed files with 59 additions and 10 deletions
@@ -113,11 +113,16 @@ namespace Barotrauma.Networking
{
serverIP = address[0];
if (!int.TryParse(address[1], out Port))
int port = 0;
if (!int.TryParse(address[1], out port))
{
DebugConsole.ThrowError("Invalid port: "+address[1]+"!");
Port = NetConfig.DefaultPort;
}
}
else
{
Port = port;
}
}
myCharacter = Character.Controlled;