From c31b9a5a1c0918c5c44a14d10f997d3b6c7e4f8f Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 5 Mar 2017 00:29:42 +1000 Subject: [PATCH] Disable a dead function in bot CTF code and fix bots trying to capture at bases that aren't available to them (grouped mode) --- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index afee84d29..b3270577d 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -1451,6 +1451,8 @@ int havocbot_ctf_teamcount(entity bot, vector org, float tc_radius) return c; } +// unused +#if 0 void havocbot_goalrating_ctf_ourflag(entity this, float ratingscale) { entity head; @@ -1464,6 +1466,7 @@ void havocbot_goalrating_ctf_ourflag(entity this, float ratingscale) if (head) navigation_routerating(this, head, ratingscale, 10000); } +#endif void havocbot_goalrating_ctf_ourbase(entity this, float ratingscale) { @@ -1472,7 +1475,15 @@ void havocbot_goalrating_ctf_ourbase(entity this, float ratingscale) while (head) { if (CTF_SAMETEAM(this, head)) + { + if (this.flagcarried) + if ((this.flagcarried.cnt || head.cnt) && this.flagcarried.cnt != head.cnt) + { + head = head.ctf_worldflagnext; // skip base if it has a different group + continue; + } break; + } head = head.ctf_worldflagnext; } if (!head) -- 2.39.2