#include "bot.qh"
#include "navigation.qh"
+#include <common/state.qh>
+
#include "../antilag.qh"
#include <common/constants.qh>
ev.z = bound(em1_z, ev.z, em2_z);
dv = ev - sv;
dv.z = 0;
- if (vlen(dv) >= 1050) // max search distance in XY
+ if(vdist(dv, >=, 1050)) // max search distance in XY
{
++relink_lengthculled;
continue;
// spawnfunc_waypoint map entity
spawnfunc(waypoint)
{
- setorigin(self, self.origin);
+ setorigin(this, this.origin);
// schedule a relink after other waypoints have had a chance to spawn
- waypoint_clearlinks(self);
- //waypoint_schedulerelink(self);
+ waypoint_clearlinks(this);
+ //waypoint_schedulerelink(this);
}
// remove a spawnfunc_waypoint, and schedule all neighbors to relink
waypoint_spawnforteleporter_boxes(e, e.absmin, e.absmax, destination, destination, timetaken);
}
-entity waypoint_spawnpersonal(vector position)
-{SELFPARAM();
+entity waypoint_spawnpersonal(entity this, vector position)
+{
entity w;
// drop the waypoint to a proper location:
w = waypoint_spawn(position, position, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_PERSONAL);
w.nearestwaypoint = world;
w.nearestwaypointtimeout = 0;
- w.owner = self;
+ w.owner = this;
waypoint_schedulerelink(w);
goto next;
}
}
-:next
+LABEL(next)
}
}
// d) The waypoint is a dead end. Dead end waypoints must be kept as