From b9caa91942ad07b3f31faf0f9e347b6f3c0ba708 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 28 Oct 2017 19:06:16 +0200 Subject: [PATCH] Bot AI: don't rate enemies running too fast for chasing them --- qcsrc/server/bot/default/havocbot/roles.qc | 2 ++ 1 file changed, 2 insertions(+) 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 /* -- 2.39.2