]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix removal of jumppad as goal not working that caused bots to get stuck on jumppads...
authorterencehill <piuntn@gmail.com>
Fri, 10 Feb 2017 15:33:38 +0000 (16:33 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 10 Feb 2017 15:33:38 +0000 (16:33 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

index fad7dbda7b0d573a75aff2f9bdbaa63187be6ea1..c084c314fcffdc16ec5ae747d57dc1e208461dcc 100644 (file)
@@ -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;