From: terencehill Date: Fri, 8 Jun 2018 18:38:46 +0000 (+0200) Subject: Bot AI: attempt to improve CTF flag retriever role X-Git-Tag: xonotic-v0.8.5~1923^2~41 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4144e59fa58f492f89fde50191306c093f4d63dd;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: attempt to improve CTF flag retriever role --- diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 4598f581e..1b10acca2 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -1884,15 +1884,20 @@ void havocbot_role_ctf_retriever(entity this) if (navigation_goalrating_timeout(this)) { - float rt_radius; - rt_radius = 10000; + const float RT_RADIUS = 10000; navigation_goalrating_start(this); - havocbot_goalrating_ctf_ourstolenflag(this, 50000); - havocbot_goalrating_ctf_droppedflags(this, 40000, this.origin, rt_radius); - havocbot_goalrating_ctf_enemybase(this, 30000); - havocbot_goalrating_items(this, 500, this.origin, rt_radius); + // role: retriever + havocbot_goalrating_ctf_ourstolenflag(this, 10000); + havocbot_goalrating_ctf_droppedflags(this, 12000, this.origin, RT_RADIUS); + havocbot_goalrating_ctf_enemybase(this, 8000); + entity ef = havocbot_ctf_find_enemy_flag(this); + vector enemy_base_org = ef.dropped_origin; + // start collecting items very close to the bot but only inside of enemy base radius + if (vdist(this.origin - enemy_base_org, <, havocbot_middlepoint_radius)) + havocbot_goalrating_items(this, 27000, this.origin, min(500, havocbot_middlepoint_radius * 0.5)); + havocbot_goalrating_items(this, 18000, this.origin, havocbot_middlepoint_radius); navigation_goalrating_end(this);