minplayer and maxplayer requirement now consider afk's as well

This commit is contained in:
jenz 2026-03-04 15:38:14 +01:00
parent c0fb1dd61a
commit c0cddad8cb

View File

@ -3226,11 +3226,11 @@ stock int InternalGetMapPlayerRestriction(const char[] map)
{
//int NumPlayers = GetClientCount(false);
int NumPlayers = 0;
//excluding non connected players, fakeclients, sourceTV, autism bots and nosteamers from player count restriction
//excluding non connected players, fakeclients, sourceTV, autism bots and AFKs from player count restriction
for (int client = 1; client <= MaxClients; client++)
{
if (IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client) && !is_bot_player[client]
)
&& GetClientIdleTime(client) < g_iPlayerAFKTime)
{
NumPlayers++;
}