// can be traveled, used for waypoint linking and havocbot
float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode)
-{
+{SELFPARAM();
vector org;
vector move;
vector dir;
// completely empty the goal stack, used when deciding where to go
void navigation_clearroute()
-{
+{SELFPARAM();
//print("bot ", etos(self), " clear\n");
self.navigation_hasgoals = false;
self.goalcurrent = world;
// That means, if the stack overflows, the bot will know how to do the FIRST 32
// steps to the goal, and then recalculate the path.
void navigation_pushroute(entity e)
-{
+{SELFPARAM();
//print("bot ", etos(self), " push ", etos(e), "\n");
self.goalstack31 = self.goalstack30;
self.goalstack30 = self.goalstack29;
// (in other words: remove a prerequisite for reaching the later goals)
// (used when a spawnfunc_waypoint is reached)
void navigation_poproute()
-{
+{SELFPARAM();
//print("bot ", etos(self), " pop\n");
self.goalcurrent = self.goalstack01;
self.goalstack01 = self.goalstack02;
// finds the waypoints near the bot initiating a navigation query
float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist)
-{
+{SELFPARAM();
entity head;
vector v, m1, m2, diff;
float c;
// queries the entire spawnfunc_waypoint network for pathes leading away from the bot
void navigation_markroutes(entity fixed_source_waypoint)
-{
+{SELFPARAM();
entity w, wp, waylist;
float searching, cost, cost2;
vector p;
// updates the best goal according to a weighted calculation of travel cost and item value of a new proposed item
void navigation_routerating(entity e, float f, float rangebias)
-{
+{SELFPARAM();
entity nwp;
vector o;
if (!e)
// adds an item to the the goal stack with the path to a given item
float navigation_routetogoal(entity e, vector startposition)
-{
+{SELFPARAM();
self.goalentity = e;
// if there is no goal, just exit
// removes any currently touching waypoints from the goal stack
// (this is how bots detect if they reached a goal)
void navigation_poptouchedgoals()
-{
+{SELFPARAM();
vector org, m1, m2;
org = self.origin;
m1 = org + self.mins;
// begin a goal selection session (queries spawnfunc_waypoint network)
void navigation_goalrating_start()
-{
+{SELFPARAM();
if(self.aistatus & AI_STATUS_STUCK)
return;
// ends a goal selection session (updates goal stack to the best goal)
void navigation_goalrating_end()
-{
+{SELFPARAM();
if(self.aistatus & AI_STATUS_STUCK)
return;
}
void navigation_unstuck()
-{
+{SELFPARAM();
float search_radius = 1000;
if (!autocvar_bot_wander_enable)
}
void debugnode(vector node)
-{
+{SELFPARAM();
if (!IS_PLAYER(self))
return;
// Debug the goal stack visually
void debuggoalstack()
-{
+{SELFPARAM();
entity goal;
vector org, go;