From: Mario Date: Sat, 4 Mar 2017 14:29:42 +0000 (+1000) Subject: Disable a dead function in bot CTF code and fix bots trying to capture at bases that... X-Git-Tag: xonotic-v0.8.2~147 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c31b9a5a1c0918c5c44a14d10f997d3b6c7e4f8f;p=xonotic%2Fxonotic-data.pk3dir.git Disable a dead function in bot CTF code and fix bots trying to capture at bases that aren't available to them (grouped mode) --- 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)