]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When a bot tries to get unstuck from a jumppad filter out the jumppad itself from...
authorterencehill <piuntn@gmail.com>
Sat, 13 May 2017 20:02:43 +0000 (22:02 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 13 May 2017 20:02:43 +0000 (22:02 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index dd65b45afa51fa0c60e0495e63d11086f0214eb5..7a2498ec39fc6fd6e0156194dace59b0c7fd9ed0 100644 (file)
@@ -518,6 +518,10 @@ void havocbot_movetogoal(entity this)
                                        this.aistatus &= ~AI_STATUS_OUT_JUMPPAD;
                                else IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 1000),
                                {
+                                       if(it.wpflags & WAYPOINTFLAG_TELEPORT)
+                                       if(it.origin.z < this.origin.z - 100 && vdist(vec2(it.origin - this.origin), <, 100))
+                                               continue;
+
                                        traceline(this.origin + this.view_ofs, ((it.absmin + it.absmax) * 0.5), true, this);
 
                                        if(trace_fraction < 1)