From: terencehill Date: Sat, 13 May 2017 20:02:43 +0000 (+0200) Subject: When a bot tries to get unstuck from a jumppad filter out the jumppad itself from... X-Git-Tag: xonotic-v0.8.5~2378^2~163 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a8e9b8b224eb20684d80192b776c0611ed1423df;p=xonotic%2Fxonotic-data.pk3dir.git When a bot tries to get unstuck from a jumppad filter out the jumppad itself from the possible destinations --- 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)