]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Bots: define the API boundaries
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index f3fedf5f10dfec6ca486e267bd9d7f037b28af37..51cb60a727136da39a2fd9f62666d46f44e7dd3f 100644 (file)
@@ -1,12 +1,11 @@
 #include "cl_impulse.qh"
 #include "round_handler.qh"
 
-#include "bot/waypoints.qh"
+#include "bot/api.qh"
 
 #include "weapons/throwing.qh"
 #include "command/common.qh"
 #include "cheats.qh"
-#include "bot/navigation.qh"
 #include "weapons/selection.qh"
 #include "weapons/tracing.qh"
 #include "weapons/weaponsystem.qh"
@@ -463,7 +462,7 @@ IMPULSE(waypoint_clear_personal)
        WaypointSprite_ClearPersonal(this);
        if (this.personal)
        {
-               remove(this.personal);
+               delete(this.personal);
                this.personal = NULL;
        }
        sprint(this, "personal waypoint cleared\n");
@@ -474,7 +473,7 @@ IMPULSE(waypoint_clear)
        WaypointSprite_ClearOwned(this);
        if (this.personal)
        {
-               remove(this.personal);
+               delete(this.personal);
                this.personal = NULL;
        }
        sprint(this, "all waypoints cleared\n");
@@ -512,7 +511,7 @@ IMPULSE(navwaypoint_save)
 IMPULSE(navwaypoint_unreachable)
 {
        if (!autocvar_g_waypointeditor) return;
-       FOREACH_ENTITY_CLASS("waypoint", true,
+       IL_EACH(g_waypoints, true,
        {
                it.colormod = '0.5 0.5 0.5';
                it.effects &= ~(EF_NODEPTHTEST | EF_RED | EF_BLUE);
@@ -524,7 +523,7 @@ IMPULSE(navwaypoint_unreachable)
 
        j = 0;
        m = 0;
-       FOREACH_ENTITY_CLASS("waypoint", it.wpcost >= 10000000,
+       IL_EACH(g_waypoints, it.wpcost >= 10000000,
        {
                LOG_INFO("unreachable: ", etos(it), " ", vtos(it.origin), "\n");
                it.colormod_z = 8;
@@ -536,7 +535,7 @@ IMPULSE(navwaypoint_unreachable)
        navigation_markroutes_inverted(e2);
 
        j = 0;
-       FOREACH_ENTITY_CLASS("waypoint", it.wpcost >= 10000000,
+       IL_EACH(g_waypoints, it.wpcost >= 10000000,
        {
                LOG_INFO("cannot reach me: ", etos(it), " ", vtos(it.origin), "\n");
                it.colormod_x = 8;