From: terencehill Date: Sat, 28 Oct 2017 17:06:16 +0000 (+0200) Subject: Bot AI: don't rate enemies running too fast for chasing them X-Git-Tag: xonotic-v0.8.5~2378^2~36 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9caa91942ad07b3f31faf0f9e347b6f3c0ba708;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: don't rate enemies running too fast for chasing them --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 54129e25d..df5e19d98 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -188,6 +188,8 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org // TODO: Merge this logic with the bot_shouldattack function if(vdist(it.origin - org, <, 100) || vdist(it.origin - org, >, sradius)) continue; + if(vdist(vec2(it.velocity), >, autocvar_sv_maxspeed * 2)) + continue; // rate only visible enemies /*