From: terencehill Date: Fri, 27 Oct 2017 18:04:26 +0000 (+0200) Subject: Make bot head to the jumppad destination once it reaches the goal item X-Git-Tag: xonotic-v0.8.5~2378^2~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=03c35ddf0881583497bab1cdeca09d28b7c0ecde;p=xonotic%2Fxonotic-data.pk3dir.git Make bot head to the jumppad destination once it reaches the goal item --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 50359e761..d77c5a18e 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -577,6 +577,16 @@ void havocbot_movetogoal(entity this) } else { + if (this.goalcurrent.bot_pickup) + { + entity jumppad_wp = this.goalcurrent_prev; + navigation_poptouchedgoals(this); + if(!this.goalcurrent && jumppad_wp.wp00) + { + // head to the jumppad destination once bot reaches the goal item + navigation_pushroute(this, jumppad_wp.wp00); + } + } gco = (this.goalcurrent.absmin + this.goalcurrent.absmax) * 0.5; if (this.origin.z > gco.z && vdist(vec2(this.velocity), <, autocvar_sv_maxspeed)) this.aistatus &= ~AI_STATUS_OUT_JUMPPAD;