30 cost =
vlen(child.origin - wp.origin);
34 child.pathlib_node_g = wp.pathlib_node_g + cost;
37 child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h + child.pathlib_node_c;
58 cost =
vlen(child.origin - wp.origin);
62 child.pathlib_node_g = wp.pathlib_node_g + cost;
64 child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h;
124 if(!best || it.pathlib_node_f < best.pathlib_node_f)
167 it.pathlib_list =
NULL;
168 it.pathlib_node_g = 0;
169 it.pathlib_node_f = 0;
170 it.pathlib_node_h = 0;
185 LOG_TRACE(
"pathlib_waypointpath: Start waypoint not linked! aborting.");
199 LOG_TRACE(
"Cannot find best open node, abort.");
207 entity start, end, open, ln;
209 LOG_TRACE(
"Target found. Rebuilding and filtering path...");
218 n =
path_build(ln,open.origin,open.path_prev,start);
243 n.nextthink =
time + 0.1;
#define IL_EACH(this, cond, body)
entity pathlib_wpp_bestopen()
var float pathlib_wpp_open(entity wp, entity child, float cost)
float pathlib_wpp_expand(entity wp)
float pathlib_wpp_openncb(entity wp, entity child, float cost)
entity pathlib_waypointpath_step()
void pathlib_wpp_close(entity wp)
#define FOREACH_ENTITY_ENT(fld, match, body)
float pathlib_wpp_opencb(entity wp, entity child, float cost)
float pathlib_searched_cnt
var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev)
bool buildpath_nodefilter_none(vector n, vector c, vector p)
var bool buildpath_nodefilter(vector n, vector c, vector p)
IntrusiveList g_waypoints
entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
entity path_build(entity next, vector where, entity prev, entity start)
void pathlib_waypointpath_autostep()
float pathlib_movecost_diag
float pathlib_h_none(vector preprev, vector prev)
void plas_think(entity this)
var float pathlib_heuristic(vector from, vector to)