Session view: show the server's player limit (not the P2P limit of 3) and a server-appropriate status text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 10:34:47 +02:00
co-authored by Claude Opus 5.5
parent 5f1f524bee
commit 9f55646123
2 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -447,10 +447,12 @@ namespace MSCO
GUILayout.Label(mp.IsHost ? "Hosting" : "Connected", titleStyle);
GUILayout.Label(mp.IsHost
? "Your game is open. Start when everyone has joined."
: "Waiting for the host to start the game.", textStyle);
: mp.IsDedicated || mp.IsConnectingToServer
? "Connected to the server - the world is loading" + (string.IsNullOrEmpty(mp.Status) ? "." : ": " + mp.Status)
: "Waiting for the host to start the game.", textStyle);
GUILayout.Space(16);
GUILayout.Label("PLAYERS " + mp.Players.Count + "/" + MultiplayerManager.MaxPlayers, captionStyle);
GUILayout.Label("PLAYERS " + mp.Players.Count + "/" + mp.SessionMaxPlayers, captionStyle);
playerScroll = GUILayout.BeginScrollView(playerScroll, GUILayout.Height(170));
foreach (PlayerInfo p in mp.Players)
{
+4
View File
@@ -547,6 +547,10 @@ namespace MSCO
string serverName; // Name des dedizierten Servers (für Discord)
int serverMaxPlayers;
/// <summary>Wie viele Spieler in diese Sitzung passen: auf einem Server dessen Limit, bei P2P 3.</summary>
public int SessionMaxPlayers { get { return (dedicated || connectingToServer) && serverMaxPlayers > 0 ? serverMaxPlayers : MaxPlayers; } }
public bool IsConnectingToServer { get { return connectingToServer; } }
string presenceKey;
long presenceStart;
float nextPresenceUpdate;