diff --git a/src/netcode/d_clisrv.c b/src/netcode/d_clisrv.c
index 71b87d28c6f7c1e2f7cb152cd472d81488b0f4f4..d222920c3baf085ba800d8c80c66ad88fba58944 100644
--- a/src/netcode/d_clisrv.c
+++ b/src/netcode/d_clisrv.c
@@ -1623,6 +1623,17 @@ INT32 D_NumPlayers(void)
 	return num;
 }
 
+/** Returns the number of nodes on the server.
+  */
+INT32 D_NumNodes(void)
+{
+	INT32 num = 0;
+	for (INT32 ix = 0; ix < MAXNETNODES; ix++)
+		if (netnodes[ix].ingame)
+			num++;
+	return num;
+}
+
 /** Similar to the above, but counts only bots.
   * Purpose is to remove bots from both the player count and the
   * max player count on the server view
diff --git a/src/netcode/d_clisrv.h b/src/netcode/d_clisrv.h
index 53ebfb15b4432cd619c28f5e7693d1e33bb7f066..f9cbf8876833486c232e7f51bbf8ae699ba6bd96 100644
--- a/src/netcode/d_clisrv.h
+++ b/src/netcode/d_clisrv.h
@@ -121,6 +121,7 @@ extern char motd[254], server_context[8];
 extern UINT8 playernode[MAXPLAYERS];
 
 INT32 D_NumPlayers(void);
+INT32 D_NumNodes(void);
 INT32 D_NumBots(void);
 
 tic_t GetLag(INT32 node);
diff --git a/src/netcode/server_connection.c b/src/netcode/server_connection.c
index 2164f411a227527dba862e80bdc48e1019f5b526..faff7e8dd73ddc9d08d0c006f5cb3c2cec749976 100644
--- a/src/netcode/server_connection.c
+++ b/src/netcode/server_connection.c
@@ -109,7 +109,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
 	netbuffer->u.serverinfo.leveltime = (tic_t)LONG(leveltime);
 
 	// Exclude bots from both counts
-	netbuffer->u.serverinfo.numberofplayer = (UINT8)(D_NumPlayers() - D_NumBots());
+	netbuffer->u.serverinfo.numberofplayer = (UINT8)D_NumNodes();
 	netbuffer->u.serverinfo.maxplayer = (UINT8)(cv_maxplayers.value - D_NumBots());
 
 	netbuffer->u.serverinfo.refusereason = GetRefuseReason(node);
@@ -164,7 +164,7 @@ static void SV_SendPlayerInfo(INT32 node)
 
 	for (UINT8 i = 0; i < MAXPLAYERS; i++)
 	{
-		if (!playeringame[i])
+		if (playernode[i] == UINT8_MAX || !netnodes[playernode[i]].ingame)
 		{
 			netbuffer->u.playerinfo[i].num = 255; // This slot is empty.
 			continue;