From fc9bcde23316e7d438cb4726a4756d1dff08c5e0 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 22 Dec 2019 00:38:53 +0100 Subject: [PATCH] When bot_vs_human is enabled ignore team assignment in the bot config file --- qcsrc/server/bot/default/bot.qc | 5 ++++- qcsrc/server/teamplay.qc | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) 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) { -- 2.39.2