});
}
- //int player_limit = GetPlayerLimit(); // TODO: use this instead of maxclients!
int bots;
// But don't remove bots immediately on level change, as the real players
// usually haven't rejoined yet
// add bots to reach minplayers if needed
bots = max(minbots, minplayers - activerealplayers);
// cap bots to the max players allowed by the server
- if(autocvar_g_maxplayers)
- bots = min(bots, autocvar_g_maxplayers - activerealplayers);
+ int player_limit = GetPlayerLimit();
+ if(player_limit)
+ bots = min(bots, player_limit - activerealplayers);
bots = min(bots, maxclients - realplayers);
if(bots > minbots)