Maelstrom: Update the UI when players enter and leave the lobby

From b8b9c8f7568514cd4e10476f4a2b41bf37e8efc0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 18 May 2026 22:46:05 -0700
Subject: [PATCH] Update the UI when players enter and leave the lobby

---
 game/lobby.cpp   | 5 +++++
 game/netplay.cpp | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/game/lobby.cpp b/game/lobby.cpp
index d04d2721..5be0ddc3 100644
--- a/game/lobby.cpp
+++ b/game/lobby.cpp
@@ -687,6 +687,8 @@ LobbyDialogDelegate::SendKick(int index)
 
 	// Now remove them from the game list
 	m_game.RemoveNode(node->nodeID);
+
+	UpdateUI();
 }
 
 void
@@ -883,6 +885,7 @@ LobbyDialogDelegate::ProcessRequestJoin(DynamicPacket &packet)
 				NET_SendDatagram(gSocket, address.host, address.port, m_reply.data, m_reply.len);
 			}
 		}
+		UpdateUI();
 	} else {
 		m_reply.StartLobbyMessage(LOBBY_KICK);
 		m_reply.Write(m_game.gameID);
@@ -910,6 +913,8 @@ LobbyDialogDelegate::ProcessRequestLeave(DynamicPacket &packet)
 
 	// Okay, clear them from the list!
 	m_game.RemoveNode(nodeID);
+
+	UpdateUI();
 }
 
 void
diff --git a/game/netplay.cpp b/game/netplay.cpp
index 7abb466f..0892445b 100644
--- a/game/netplay.cpp
+++ b/game/netplay.cpp
@@ -141,6 +141,11 @@ int CheckPlayers(void)
 		return(-1);
 	}
 
+	if (gGameInfo.IsDeathmatch() && gGameInfo.GetNumPlayers() == 1) {
+		error("Single player deathmatch not allowed!\r\n");
+		return(-1);
+	}
+
 	return(0);
 }