]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't get unstuck bot from jumppad (leading it to a random visible waypoint) if it...
authorterencehill <piuntn@gmail.com>
Mon, 13 Feb 2017 16:12:42 +0000 (17:12 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 13 Feb 2017 16:12:42 +0000 (17:12 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

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