From a8e9b8b224eb20684d80192b776c0611ed1423df Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 13 May 2017 22:02:43 +0200 Subject: [PATCH] When a bot tries to get unstuck from a jumppad filter out the jumppad itself from the possible destinations --- qcsrc/server/bot/default/havocbot/havocbot.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index dd65b45af..7a2498ec3 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -518,6 +518,10 @@ void havocbot_movetogoal(entity this) this.aistatus &= ~AI_STATUS_OUT_JUMPPAD; else IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 1000), { + if(it.wpflags & WAYPOINTFLAG_TELEPORT) + if(it.origin.z < this.origin.z - 100 && vdist(vec2(it.origin - this.origin), <, 100)) + continue; + traceline(this.origin + this.view_ofs, ((it.absmin + it.absmax) * 0.5), true, this); if(trace_fraction < 1) -- 2.39.2