]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/havocbot.qc
Add an intrusive list for bot waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / havocbot.qc
index aca4b9756a2c4a2be3aecec2d479a6a9fdd3aaa0..b22ded20fb618f0e7c58ca0b74612c327e47483e 100644 (file)
@@ -46,7 +46,7 @@ void havocbot_ai(entity this)
                {
                        // Look for the closest waypoint out of water
                        entity newgoal = NULL;
-                       FOREACH_ENTITY_CLASS("waypoint", vdist(it.origin - this.origin, <=, 10000),
+                       IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 10000),
                        {
                                if(it.origin.z < this.origin.z)
                                        continue;
@@ -486,7 +486,7 @@ void havocbot_movetogoal(entity this)
                        if(fabs(this.velocity.z)<50)
                        {
                                entity newgoal = NULL;
-                               FOREACH_ENTITY_CLASS("waypoint", vdist(it.origin - this.origin, <=, 1000),
+                               IL_EACH(g_waypoints, vdist(it.origin - this.origin, <=, 1000),
                                {
                                        traceline(this.origin + this.view_ofs, ((it.absmin + it.absmax) * 0.5), true, this);