LCEMP commit: support more max players

This commit is contained in:
2026-08-14 11:46:19 +03:00
parent 6853eab85f
commit 67a8111974
11 changed files with 36 additions and 22 deletions
@@ -1309,7 +1309,7 @@ void NetworkSocketLayer::UpdateAdvertisePlayerNames(BYTE count, const char playe
EnterCriticalSection(&s_advertiseLock);
memset(s_advertiseData.playerNames, 0, sizeof(s_advertiseData.playerNames));
s_advertiseData.playerCount = count;
for (int i = 0; i < count && i < 8; i++)
for (int i = 0; i < count && i < NETWORK_LAN_BROADCAST_PLAYERS; i++)
{
memcpy(s_advertiseData.playerNames[i], playerNames[i],
NETWORK_LAN_PLAYER_NAME_SIZE < (int)XUSER_NAME_SIZE ? NETWORK_LAN_PLAYER_NAME_SIZE : (int)XUSER_NAME_SIZE);
@@ -1587,7 +1587,7 @@ int NetworkSocketLayer::DiscoveryThreadProc(LPVOID param)
broadcast->hostName[31] = L'\0';
for (int pn = 0; pn < 8; pn++)
for (int pn = 0; pn < NETWORK_LAN_BROADCAST_PLAYERS; pn++)
broadcast->playerNames[pn][XUSER_NAME_SIZE - 1] = '\0';
char senderIP[64];