From 9f5564612323781e3b7975c4038a0ff4dceb01d7 Mon Sep 17 00:00:00 2001 From: MrMaho Date: Sun, 27 Sep 2026 10:34:47 +0200 Subject: [PATCH] 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 --- LobbyUI.cs | 6 ++++-- MultiplayerManager.cs | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/LobbyUI.cs b/LobbyUI.cs index 3a7afb6..7ddee05 100644 --- a/LobbyUI.cs +++ b/LobbyUI.cs @@ -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) { diff --git a/MultiplayerManager.cs b/MultiplayerManager.cs index 5d801ba..6c521f9 100644 --- a/MultiplayerManager.cs +++ b/MultiplayerManager.cs @@ -547,6 +547,10 @@ namespace MSCO string serverName; // Name des dedizierten Servers (für Discord) int serverMaxPlayers; + + /// Wie viele Spieler in diese Sitzung passen: auf einem Server dessen Limit, bei P2P 3. + public int SessionMaxPlayers { get { return (dedicated || connectingToServer) && serverMaxPlayers > 0 ? serverMaxPlayers : MaxPlayers; } } + public bool IsConnectingToServer { get { return connectingToServer; } } string presenceKey; long presenceStart; float nextPresenceUpdate;