From 03c35ddf0881583497bab1cdeca09d28b7c0ecde Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 27 Oct 2017 20:04:26 +0200 Subject: [PATCH] Make bot head to the jumppad destination once it reaches the goal item --- qcsrc/server/bot/default/havocbot/havocbot.qc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.2