// But don't remove bots immediately on level change, as the real players
// usually haven't rejoined yet
bots_would_leave = FALSE;
- if ((realplayers || cvar("bot_join_empty") || (currentbots > 0 && time < 5)))
+ if (teamplay && cvar("bot_vs_human") && (c3==-1 && c4==-1))
+ bots = min(ceil(fabs(cvar("bot_vs_human")) * activerealplayers), maxclients - realplayers);
+ else if ((realplayers || cvar("bot_join_empty") || (currentbots > 0 && time < 5)))
{
float realminplayers, minplayers;
realminplayers = cvar("minplayers");
minplayers = max(0, floor(realminplayers));
float realminbots, minbots;
- if(teamplay && cvar("bot_vs_human"))
- realminbots = ceil(fabs(cvar("bot_vs_human")) * activerealplayers);
- else
- realminbots = cvar("bot_number");
+ realminbots = cvar("bot_number");
minbots = max(0, floor(realminbots));
bots = min(max(minbots, minplayers - activerealplayers), maxclients - realplayers);
race_SendRankings(i, 0, 0, MSG_ONE);
}
}
- else if(cvar("sv_teamnagger") && !g_ca) // teamnagger is currently bad for ca
+ else if(cvar("sv_teamnagger") && !(cvar("bot_vs_human") && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
send_CSQC_teamnagger();
CheatInitClient();
return 0;
if(cvar("g_campaign"))
return 0;
+ if(cvar("bot_vs_human") && (c3==-1 && c4==-1))
+ return 0;
if(!cvar("g_balance_teams_force"))
return -1;
return 1;
}
// TODO: Balance quantity of bots across > 2 teams when bot_vs_human is set (and remove next line)
- if(c3==-1&&c4==-1)
+ if(c3==-1 && c4==-1)
if(cvar("bot_vs_human") && for_whom)
{
if(cvar("bot_vs_human") > 0)
if(c4 >= 0)
totalteams = totalteams + 1;
- if(cvar("bot_vs_human"))
+ if(cvar("bot_vs_human") && totalteams == 1)
totalteams += 1;
if(totalteams <= 1)