From: terencehill Date: Sat, 21 Dec 2019 23:38:53 +0000 (+0100) Subject: When bot_vs_human is enabled ignore team assignment in the bot config file X-Git-Tag: xonotic-v0.8.5~1203 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fc9bcde23316e7d438cb4726a4756d1dff08c5e0;p=xonotic%2Fxonotic-data.pk3dir.git When bot_vs_human is enabled ignore team assignment in the bot config file --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 40afed179..1ab7e9737 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -211,7 +211,10 @@ void bot_setnameandstuff(entity this) if(argv(4) != "" && stof(argv(4)) >= 0) bot_pants = argv(4); else bot_pants = ftos(floor(random() * 15)); - this.bot_forced_team = stof(argv(5)); + if (teamplay && autocvar_bot_vs_human && AvailableTeams() == 2) + this.bot_forced_team = 0; + else + this.bot_forced_team = stof(argv(5)); prio = 6; diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index ff9438e76..a7c7205c1 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -496,8 +496,7 @@ entity TeamBalance_CheckAllowedTeams(entity for_whom) } // TODO: Balance quantity of bots across > 2 teams when bot_vs_human is set (and remove next line) - if (AvailableTeams() == 2) - if (autocvar_bot_vs_human && for_whom) + if (autocvar_bot_vs_human && AvailableTeams() == 2 && for_whom) { if (autocvar_bot_vs_human > 0) {