4 #define inwater(point) (pointcontents(point) == CONTENT_WATER)
\r
5 #define medium spawnshieldtime
\r
7 #define PLIB_FORWARD '0 1 0'
\r
8 //#define PLIB_BACK '0 -1 0'
\r
9 #define PLIB_RIGHT '1 0 0'
\r
10 //#define PLIB_LEFT '-1 0 0'
\r
12 #define DEBUGPATHING
\r
14 void pathlib_showpath(entity start);
\r
15 void pathlib_showpath2(entity path);
\r
22 .float is_path_node;
\r
23 .float pathlib_node_g;
\r
24 .float pathlib_node_h;
\r
25 .float pathlib_node_f;
\r
27 float pathlib_open_cnt;
\r
28 float pathlib_closed_cnt;
\r
29 float pathlib_made_cnt;
\r
30 float pathlib_merge_cnt;
\r
31 float pathlib_searched_cnt;
\r
32 float pathlib_bestopen_seached;
\r
33 float pathlib_bestcash_hits;
\r
34 float pathlib_bestcash_saved;
\r
35 float pathlib_gridsize;
\r
36 float pathlib_movecost;
\r
37 float pathlib_movecost_diag;
\r
38 float pathlib_movecost_waterfactor;
\r
39 float pathlib_foundgoal;
\r
41 float pathlib_starttime;
\r
42 #define pathlib_maxtime 5
\r
44 entity best_open_node;
\r
46 vector tile_check_up;
\r
47 vector tile_check_down;
\r
48 float tile_check_size;
\r
49 float tile_check_cross(vector where);
\r
50 float tile_check_plus(vector where);
\r
51 float tile_check_star(vector where);
\r
52 var float tile_check(vector where);
\r
54 float movenode_stepsize;
\r
55 vector movenode_stepup;
\r
56 vector movenode_maxdrop;
\r
57 vector movenode_boxup;
\r
58 vector movenode_boxmax;
\r
59 vector movenode_boxmin;
\r
60 float pathlib_movenode_goodnode;
\r
62 vector pathlib_wateroutnode(vector start, vector end);
\r
63 vector pathlib_swimnode(vector start, vector end);
\r
64 vector pathlib_flynode(vector start, vector end);
\r
65 vector pathlib_walknode(vector start, vector end, float doedge);
\r
66 var vector pathlib_movenode(vector start, vector end, float doedge);
\r
68 float pathlib_expandnode_star(entity node, vector start, vector goal);
\r
69 float pathlib_expandnode_box(entity node, vector start, vector goal);
\r
70 float pathlib_expandnode_octagon(entity node, vector start, vector goal);
\r
71 var float pathlib_expandnode(entity node, vector start, vector goal);
\r
73 float pathlib_g_static(entity parent, vector to, float static_cost);
\r
74 float pathlib_g_static_water(entity parent, vector to, float static_cost);
\r
75 float pathlib_g_euclidean(entity parent, vector to, float static_cost);
\r
76 float pathlib_g_euclidean_water(entity parent, vector to, float static_cost);
\r
77 var float pathlib_cost(entity parent, vector to, float static_cost);
\r
79 float pathlib_h_manhattan(vector a, vector b);
\r
80 float pathlib_h_diagonal(vector a, vector b);
\r
81 float pathlib_h_euclidean(vector a,vector b);
\r
82 float pathlib_h_diagonal2(vector a, vector b);
\r
83 float pathlib_h_diagonal3(vector a, vector b);
\r
84 float pathlib_h_diagonal2sdp(vector preprev, vector prev, vector point, vector end);
\r
85 var float pathlib_heuristic(vector from, vector to);
\r
87 var float pathlib_makenode(entity parent,vector start, vector to, vector goal,float cost);
\r
88 var float buildpath_nodefilter(vector n,vector c,vector p);
\r
95 #include "utility.qc"
\r
96 #include "movenode.qc"
\r
98 #include "expandnode.qc"
\r