Commit 31-player lobby support (untested, needs follow-up)

Carry the remaining CTCL, lobby, and player-limit updates onto the new moreplayers branch.

This change set is intentionally marked untested and may still be broken. It needs follow-up validation and likely further work before it should be considered stable.

Co-authored-by: Claude Sonnet 4.6 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
This commit is contained in:
2026-07-19 14:38:58 -05:00
co-authored by Claude Sonnet 4.6 GitHub Copilot
parent 106bb5b59f
commit acd4e40fa2
10 changed files with 48 additions and 47 deletions
+4 -3
View File
@@ -13316,9 +13316,10 @@ void CTCL_API CTCL_DefaultHostSetup(int nMode)
params->m_maxBots = 8;
//}
} else {
params->m_maxPlayers = 16;
Environment.NetworkMaxPlayers = 16;
params->m_maxBots = 16;
params->m_maxPlayers = 31; // 31: max that fits in 5-bit bitstream (0-31)
Environment.NetworkMaxPlayers = 31;
params->m_maxBots = 31;
gos_NetServerCommands(gos_Commend_UpdateMaxPlayers, 0); // push the updated limit to the live DirectPlay session
}
params->m_allow3rdPerson = 1;
if ((nMode != 0) && (nMode != 4)) {
+4 -4
View File
@@ -808,8 +808,8 @@ void NetMissionParameters::MWNetMissionParameters::SaveParameters(DynamicMemoryS
stream->WriteBits(&m_pureMapCycle,1);
stream->WriteBits(&m_maxPlayers, 5); // 16 players maximum
stream->WriteBits(&m_maxBots, 5); // 16 players maximum
stream->WriteBits(&m_maxPlayers, 5); // max 31 players
stream->WriteBits(&m_maxBots, 5); // max 31
stream->WriteBits(&m_mapID, 16); // 65535 maps available
stream->WriteBits(&m_mapClientCRC, 64);
@@ -927,8 +927,8 @@ void NetMissionParameters::MWNetMissionParameters::LoadParameters(MemoryStream *
stream->ReadBits(&m_useMapCycle,1);
stream->ReadBits(&m_pureMapCycle,1);
stream->ReadBits(&m_maxPlayers, 5); // 16 players max
stream->ReadBits(&m_maxBots, 5); // 16 players max
stream->ReadBits(&m_maxPlayers, 5); // max 31 players
stream->ReadBits(&m_maxBots, 5); // max 31
stream->ReadBits(&m_mapID, 16); // 65535 maps available
stream->ReadBits(&m_mapClientCRC, 64);
+1 -1
View File
@@ -150,7 +150,7 @@ extern int g_nMech4Comm;
// server & client only
extern BOOL g_bIsServer;
// console(All), server & client only(g_aPlayerInfos[0]), server only(g_aPlayerInfos[1..g_nBOTs]
extern SPlayerInfo g_aPlayerInfos[20];
extern SPlayerInfo g_aPlayerInfos[35]; // 31 pilots + 1 CS + 3 spare
extern int g_nPlayerInfos;
extern int g_nServer;
extern int g_nTeslas;