From: terencehill Date: Mon, 13 Feb 2017 16:12:42 +0000 (+0100) Subject: Don't get unstuck bot from jumppad (leading it to a random visible waypoint) if it... X-Git-Tag: xonotic-v0.8.2~202^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df7cc0f9e47327aa077613f6fd16f63f62b2c255;p=xonotic%2Fxonotic-data.pk3dir.git Don't get unstuck bot from jumppad (leading it to a random visible waypoint) if it almost reached jumppad destination (e.g. jumppad near the mega armor on Tarx) --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index c084c314f..606857611 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -517,7 +517,9 @@ void havocbot_movetogoal(entity this) if(fabs(this.velocity.z)<50) { entity newgoal = NULL; - IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 1000), + if (vdist(this.origin - this.goalcurrent.origin, <, 150)) + this.aistatus &= ~AI_STATUS_OUT_JUMPPAD; + else IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 1000), { traceline(this.origin + this.view_ofs, ((it.absmin + it.absmax) * 0.5), true, this);