From d85653ce95f22214fb5c66c4f5bd316ad7690ae0 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 10 Feb 2017 16:33:38 +0100 Subject: [PATCH] Fix removal of jumppad as goal not working that caused bots to get stuck on jumppads if it gets selected as destination --- qcsrc/server/bot/default/havocbot/havocbot.qc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index fad7dbda7..c084c314f 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -544,12 +544,10 @@ void havocbot_movetogoal(entity this) } else { - if(this.velocity.z>0) + if(time - this.lastteleporttime > 0.3 && this.velocity.z > 0) { - float threshold; vector velxy = this.velocity; velxy_z = 0; - threshold = maxspeed * 0.2; - if(vdist(velxy, <, threshold)) + if(vdist(velxy, <, autocvar_sv_maxspeed * 0.2)) { LOG_TRACE("Warning: ", this.netname, " got stuck on a jumppad (velocity in xy is ", vtos(velxy), "), trying to get out of it now"); this.aistatus |= AI_STATUS_OUT_JUMPPAD; -- 2.39.2