diff --git a/r5dev/engine/server/server.cpp b/r5dev/engine/server/server.cpp index c4836380..886c6d0b 100644 --- a/r5dev/engine/server/server.cpp +++ b/r5dev/engine/server/server.cpp @@ -83,7 +83,7 @@ int CServer::GetNumClients(void) const // Purpose: Initializes a CSVClient for a new net connection. This will only be called // once for a player each game, not once for each level change. // Input : *pServer - -// *pInpacket - +// *pChallenge - // Output : pointer to client instance on success, nullptr on failure //--------------------------------------------------------------------------------- CClient* CServer::ConnectClient(CServer* pServer, user_creds_s* pChallenge) diff --git a/r5dev/engine/server/sv_main.cpp b/r5dev/engine/server/sv_main.cpp index 534038f3..0b55f4bd 100644 --- a/r5dev/engine/server/sv_main.cpp +++ b/r5dev/engine/server/sv_main.cpp @@ -76,7 +76,7 @@ void SV_CheckForBan(const BannedVec_t* pBannedVec /*= nullptr*/) Assert(ThreadInMainThread()); BannedVec_t bannedVec; - for (int c = 0; c < MAX_PLAYERS; c++) // Loop through all possible client instances. + for (int c = 0; c < g_ServerGlobalVariables->m_nMaxClients; c++) // Loop through all possible client instances. { CClient* pClient = g_pClient->GetClient(c); if (!pClient) diff --git a/r5dev/game/server/physics_main.cpp b/r5dev/game/server/physics_main.cpp index 851adf41..72d8d6fd 100644 --- a/r5dev/game/server/physics_main.cpp +++ b/r5dev/game/server/physics_main.cpp @@ -19,7 +19,7 @@ void Physics_RunBotSimulation(bool bSimulating) if (!sv_simulateBots->GetBool()) return; - for (int i = 0; i < MAX_PLAYERS; i++) + for (int i = 0; i < g_ServerGlobalVariables->m_nMaxClients; i++) { CClient* pClient = g_pClient->GetClient(i); if (!pClient) diff --git a/r5dev/networksystem/bansystem.cpp b/r5dev/networksystem/bansystem.cpp index 1dc7d4ff..f3c7efb3 100644 --- a/r5dev/networksystem/bansystem.cpp +++ b/r5dev/networksystem/bansystem.cpp @@ -294,7 +294,7 @@ void CBanSystem::AuthorPlayerByName(const char* playerName, const bool shouldBan if (!reason) reason = shouldBan ? "Banned from server" : "Kicked from server"; - for (int i = 0; i < MAX_PLAYERS; i++) + for (int i = 0; i < g_ServerGlobalVariables->m_nMaxClients; i++) { CClient* pClient = g_pClient->GetClient(i); if (!pClient) @@ -347,7 +347,7 @@ void CBanSystem::AuthorPlayerById(const char* playerHandle, const bool shouldBan if (!reason) reason = shouldBan ? "Banned from server" : "Kicked from server"; - for (int i = 0; i < MAX_PLAYERS; i++) + for (int i = 0; i < g_ServerGlobalVariables->m_nMaxClients; i++) { CClient* pClient = g_pClient->GetClient(i); if (!pClient)