(85a4d4243) Fixed Steam servers never refreshing their info on the master server (game started, settings, etc), report the currently selected sub to Steam. Closes #1489

This commit is contained in:
Joonas Rikkonen
2019-05-23 15:18:13 +03:00
parent 5c06210265
commit c6f2125b4f
2 changed files with 5 additions and 0 deletions

View File

@@ -182,6 +182,10 @@ namespace Barotrauma.Networking
if (SteamManager.USE_STEAM)
{
SteamManager.CreateServer(this, isPublic);
if (isPublic)
{
registeredToMaster = true;
}
}
if (isPublic && !GameMain.Config.UseSteamMatchmaking)
{

View File

@@ -48,6 +48,7 @@ namespace Barotrauma.Steam
instance.server.ServerName = server.Name;
instance.server.MaxPlayers = server.ServerSettings.MaxPlayers;
instance.server.Passworded = server.ServerSettings.HasPassword;
instance.server.MapName = GameMain.NetLobbyScreen?.SelectedSub?.DisplayName ?? "";
Instance.server.SetKey("message", GameMain.Server.ServerSettings.ServerMessageText);
Instance.server.SetKey("version", GameMain.Version.ToString());
Instance.server.SetKey("contentpackage", string.Join(",", GameMain.Config.SelectedContentPackages.Select(cp => cp.Name)));