]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/pathlib/pathlib.qh
Merge branch 'master' into Mario/mutator_array_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / pathlib / pathlib.qh
index 765fe2a7f201b6bfa6b1e1da7e70c0cac3284d31..028a2c7e6e5b26eb9b01650327ab8b153bc5617e 100644 (file)
@@ -1,19 +1,21 @@
-#ifndef PATHLIB_H
-#define PATHLIB_H
+#pragma once
+
+#ifndef DEBUGPATHING
+       #define DEBUGPATHING 0
+#endif
 
 .entity pathlib_list;
 .entity path_next;
 .entity path_prev;
 
 #define inwater(point) (pointcontents(point) == CONTENT_WATER)
-#define medium spawnshieldtime
 
 const vector PLIB_FORWARD = '0 1 0';
 //#define PLIB_BACK    '0 -1 0'
 const vector PLIB_RIGHT = '1 0 0';
 //#define PLIB_LEFT    '-1 0 0'
 
-#ifdef DEBUGPATHING
+#if DEBUGPATHING
 void pathlib_showpath(entity start);
 void pathlib_showpath2(entity path);
 #endif
@@ -47,7 +49,7 @@ float pathlib_closed_cnt;
 float pathlib_made_cnt;
 float pathlib_merge_cnt;
 float pathlib_searched_cnt;
-float pathlib_bestopen_seached;
+float pathlib_bestopen_searched;
 float pathlib_bestcash_hits;
 float pathlib_bestcash_saved;
 float pathlib_gridsize;
@@ -64,10 +66,10 @@ entity best_open_node;
 vector tile_check_up;
 vector tile_check_down;
 float  tile_check_size;
-float     tile_check_cross(vector where);
-float     tile_check_plus(vector where);
-float     tile_check_star(vector where);
-var float tile_check(vector where);
+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);
 
 float  movenode_stepsize;
 vector movenode_stepup;
@@ -77,11 +79,11 @@ vector movenode_boxmax;
 vector movenode_boxmin;
 float  pathlib_movenode_goodnode;
 
-vector     pathlib_wateroutnode(vector start, vector end, float doedge);
-vector     pathlib_swimnode(vector start, vector end, float doedge);
-vector     pathlib_flynode(vector start, vector end, float doedge);
-vector     pathlib_walknode(vector start, vector end, float doedge);
-var vector pathlib_movenode(vector start, vector end, float doedge);
+vector     pathlib_wateroutnode(entity this, vector start, vector end, float doedge);
+vector     pathlib_swimnode(entity this, vector start, vector end, float doedge);
+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_star(entity node, vector start, vector goal);
 float      pathlib_expandnode_box(entity node, vector start, vector goal);
@@ -107,5 +109,3 @@ var float  pathlib_makenode(entity parent,vector start, vector to, vector goal,f
 var float  buildpath_nodefilter(vector n,vector c,vector p);
 
 var float  pathlib_wpp_waypointcallback(entity wp, entity wp_prev);
-
-#endif