]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/pathlib/pathlib.qh
Improve cl_gunalign cvar description
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / pathlib / pathlib.qh
index 028a2c7e6e5b26eb9b01650327ab8b153bc5617e..edfb98b2a2104962d736327f377037a1d8d5c13a 100644 (file)
@@ -15,18 +15,13 @@ const vector PLIB_FORWARD = '0 1 0';
 const vector PLIB_RIGHT = '1 0 0';
 //#define PLIB_LEFT    '-1 0 0'
 
-#if DEBUGPATHING
-void pathlib_showpath(entity start);
-void pathlib_showpath2(entity path);
-#endif
-
 entity openlist;
 entity closedlist;
 
 entity goal_node;
 entity start_node;
 
-.float is_path_node;
+.bool is_path_node;
 .float pathlib_node_g;
 .float pathlib_node_h;
 .float pathlib_node_f;
@@ -66,10 +61,10 @@ entity best_open_node;
 vector tile_check_up;
 vector tile_check_down;
 float  tile_check_size;
-float     tile_check_cross(entity this, vector where);
-float     tile_check_plus(entity this, vector where);
-float     tile_check_star(entity this, vector where);
-var float tile_check(entity this, vector where);
+bool     tile_check_cross(entity this, vector where);
+bool     tile_check_plus(entity this, vector where);
+bool     tile_check_star(entity this, vector where);
+var bool tile_check(entity this, vector where);
 
 float  movenode_stepsize;
 vector movenode_stepup;
@@ -77,7 +72,7 @@ vector movenode_maxdrop;
 vector movenode_boxup;
 vector movenode_boxmax;
 vector movenode_boxmin;
-float  pathlib_movenode_goodnode;
+bool  pathlib_movenode_goodnode;
 
 vector     pathlib_wateroutnode(entity this, vector start, vector end, float doedge);
 vector     pathlib_swimnode(entity this, vector start, vector end, float doedge);
@@ -85,9 +80,10 @@ vector     pathlib_flynode(entity this, vector start, vector end, float doedge);
 vector     pathlib_walknode(entity this, vector start, vector end, float doedge);
 var vector pathlib_movenode(entity this, vector start, vector end, float doedge);
 
+//float      pathlib_expandnode_starf(entity node, vector start, vector goal);
 float      pathlib_expandnode_star(entity node, vector start, vector goal);
 float      pathlib_expandnode_box(entity node, vector start, vector goal);
-float      pathlib_expandnode_octagon(entity node, vector start, vector goal);
+//float      pathlib_expandnode_octagon(entity node, vector start, vector goal);
 var float  pathlib_expandnode(entity node, vector start, vector goal);
 
 float      pathlib_g_static(entity parent, vector to, float static_cost);
@@ -105,7 +101,10 @@ float      pathlib_h_diagonal2sdp(vector preprev, vector prev, vector point, vec
 float      pathlib_h_none(vector preprev, vector prev) { return 0; }
 var float  pathlib_heuristic(vector from, vector to);
 
-var float  pathlib_makenode(entity parent,vector start, vector to, vector goal,float cost);
-var float  buildpath_nodefilter(vector n,vector c,vector p);
+var bool  pathlib_makenode(entity parent,vector start, vector to, vector goal,float cost);
+var bool  buildpath_nodefilter(vector n,vector c,vector p);
 
 var float  pathlib_wpp_waypointcallback(entity wp, entity wp_prev);
+
+IntrusiveList g_pathlib_nodes;
+STATIC_INIT(g_pathlib_nodes) { g_pathlib_nodes = IL_NEW(); }