X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fteamplay.qc;h=1232e3c8eb9262f180e8bb97279fdaf761f29181;hb=168b974f2e9e994c4634b6be43e2d4a77f311980;hp=2a08ec5cf9d7d56379eee6ace2e347944bb91cfe;hpb=992844fd6e60c81367e690c7bfef86159aefb3b8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 2a08ec5cf..1232e3c8e 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -16,6 +16,8 @@ float IsTeamBalanceForced() 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; @@ -208,9 +210,6 @@ void InitGameplayMode() fraglimit_override = cvar("fraglimit_override"); leadlimit_override = cvar("leadlimit_override"); - if(cvar("g_dodging")) - MUTATOR_ADD(dodging); - if(g_dm) { game = GAME_DEATHMATCH; @@ -511,8 +510,6 @@ void PrintWelcomeMessage(entity pl) modifications = strcat(modifications, ", Low gravity"); if(g_cloaked) modifications = strcat(modifications, ", Cloaked"); - if(g_footsteps) - modifications = strcat(modifications, ", Steps"); if(g_grappling_hook) modifications = strcat(modifications, ", Hook"); if(g_laserguided_missile) @@ -694,7 +691,7 @@ void CheckAllowedTeams (entity for_whom) } // 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) @@ -721,6 +718,7 @@ float PlayerValue(entity p) if(IsTeamBalanceForced() == 1) return 1; return 1; + // FIXME: it always returns 1... } // c1...c4 should be set to -1 (not allowed) or 0 (allowed). @@ -799,7 +797,7 @@ float FindSmallestTeam(entity pl, float ignore_pl) if(c4 >= 0) totalteams = totalteams + 1; - if(cvar("bot_vs_human")) + if(cvar("bot_vs_human") && totalteams == 1) totalteams += 1; if(totalteams <= 1) @@ -938,7 +936,7 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam) smallest = FindSmallestTeam(pl, TRUE); - if(!only_return_best) + if(!only_return_best && !pl.bot_forced_team) { TeamchangeFrags(self); if(smallest == 1)