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
@@ -24,8 +24,6 @@ namespace Barotrauma.Networking
private NetServer server;
private NetPeerConfiguration config;
private int MaxPlayers;
private DateTime refreshMasterTimer;
@@ -69,7 +67,7 @@ namespace Barotrauma.Networking
{
get { return updateInterval; }
}
public GameServer(string name, int port, bool isPublic = false, string password = "", bool attemptUPnP = false, int maxPlayers = 10)
{
name = name.Replace(":", "");
@@ -78,6 +76,7 @@ namespace Barotrauma.Networking
AdminAuthPass = "";
this.name = name;
this.Public = isPublic;
this.password = "";
if (password.Length>0)
{