Xonotic
|
Go to the source code of this file.
Macros | |
#define | DEBUGPATHING 0 |
#define | inwater(point) (pointcontents(point) == CONTENT_WATER) |
#define DEBUGPATHING 0 |
Definition at line 4 of file pathlib.qh.
#define inwater | ( | point | ) | (pointcontents(point) == CONTENT_WATER) |
Definition at line 11 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_g_euclidean_water(), pathlib_g_static_water(), and pathlib_makenode_adaptive().
Referenced by path_build(), pathlib_astar(), pathlib_h_none(), and pathlib_waypointpath_step().
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 224 of file expandnode.qc.
References pathlib_gridsize, pathlib_makenode(), pathlib_movecost, pathlib_open_cnt, v, and vector().
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 96 of file expandnode.qc.
References LOG_TRACE, pathlib_gridsize, pathlib_makenode(), pathlib_movecost, pathlib_movecost_diag, pathlib_node_edgeflag_back, pathlib_node_edgeflag_backleft, pathlib_node_edgeflag_backright, pathlib_node_edgeflag_forward, pathlib_node_edgeflag_forwardleft, pathlib_node_edgeflag_forwardright, pathlib_node_edgeflag_left, pathlib_node_edgeflag_none, pathlib_node_edgeflag_right, pathlib_node_edgeflag_unknown, pathlib_open_cnt, PLIB_FORWARD, PLIB_RIGHT, tile_check_plus2(), vector(), and vtos().
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 65 of file movenode.qc.
References fsnap(), MOVE_WORLDONLY, movenode_boxmax, movenode_boxmin, pathlib_gridsize, pathlib_movenode_goodnode, and trace_fraction.
Definition at line 21 of file costs.qc.
References inwater, pathlib_movecost_waterfactor, and vlen().
Referenced by pathlib_astar().
This heuristic consider both straight and diagonal moves to have the same cost.
Definition at line 49 of file costs.qc.
References fabs(), max(), and pathlib_movecost.
Referenced by pathlib_astar().
This heuristic consider both straight and diagonal moves, but has a separate cost for diagonal moves.
Definition at line 74 of file costs.qc.
References fabs(), min(), pathlib_movecost, and pathlib_movecost_diag.
This heuristic consider both straight and diagonal moves, But has a separate cost for diagonal moves.
Definition at line 98 of file costs.qc.
References fabs(), normalize(), pathlib_movecost, pathlib_movecost_diag, vector(), and vlen().
Definition at line 122 of file costs.qc.
References fabs(), pathlib_movecost, and pathlib_movecost_diag.
Manhattan heuristic means we expect to move up, down left or right No diagonal moves expected.
(like moving between city blocks)
Definition at line 34 of file costs.qc.
References fabs(), and pathlib_gridsize.
Definition at line 101 of file pathlib.qh.
References buildpath_nodefilter(), entity(), parent, pathlib_heuristic(), pathlib_makenode(), pathlib_wpp_waypointcallback(), to, and vector().
Referenced by pathlib_waypointpath().
Referenced by pathlib_astar(), pathlib_h_none(), pathlib_makenode_adaptive(), pathlib_waypointpath(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
Referenced by pathlib_astar(), pathlib_expandnode_box(), pathlib_expandnode_star(), and pathlib_h_none().
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 45 of file movenode.qc.
References CONTENT_EMPTY, CONTENT_WATER, fsnap(), MOVE_WORLDONLY, movenode_boxmax, movenode_boxmin, pathlib_gridsize, pathlib_movenode_goodnode, pathlib_wateroutnode(), and trace_fraction.
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 88 of file movenode.qc.
References a_think(), direction, entity(), fsnap(), LOG_DEBUG, LOG_TRACE, MOVE_WORLDONLY, movenode_boxmax, movenode_boxmin, movenode_boxup, movenode_maxdrop, movenode_stepsize, movenode_stepup, normalize(), pathlib_gridsize, pathlib_movenode_goodnode, rint(), setorigin(), setthink, spawn(), time, trace_endpos, trace_fraction, vector(), vlen(), and vtos().
Referenced by buildpath_nodefilter_moveskip(), pathlib_astar(), pathlib_close_node(), and pathlib_makenode_adaptive().
Definition at line 11 of file movenode.qc.
References CONTENT_EMPTY, CONTENT_SOLID, fabs(), fsnap(), MOVE_WORLDONLY, movenode_boxmax, movenode_boxmin, pathlib_gridsize, pathlib_movenode_goodnode, trace_endpos, trace_fraction, and vector().
Referenced by pathlib_swimnode().
Referenced by pathlib_h_none(), pathlib_waypointpath(), and pathlib_wpp_opencb().
STATIC_INIT | ( | g_pathlib_nodes | ) |
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
Definition at line 43 of file utility.qc.
References location_isok(), MOVE_WORLDONLY, PLIB_FORWARD, PLIB_RIGHT, tile_check_down, tile_check_size, tile_check_up, trace_endpos, and vector().
Referenced by pathlib_astar(), and tile_check_star().
Definition at line 77 of file utility.qc.
References location_isok(), MOVE_WORLDONLY, PLIB_FORWARD, PLIB_RIGHT, tile_check_down, tile_check_size, tile_check_up, trace_endpos, and vector().
Referenced by tile_check_star().
Definition at line 206 of file utility.qc.
References tile_check_cross(), and tile_check_plus().
entity best_open_node |
Definition at line 59 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_cleanup(), pathlib_close_node(), pathlib_getbestopen(), pathlib_makenode_adaptive(), pathlib_wpp_bestopen(), pathlib_wpp_close(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
entity closedlist |
Definition at line 19 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_cleanup(), pathlib_close_node(), pathlib_waypointpath(), pathlib_wpp_close(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
IntrusiveList g_pathlib_nodes |
Definition at line 109 of file pathlib.qh.
Referenced by dumpnode(), pathlib_cleanup(), pathlib_mknode(), and pathlib_nodeatpoint().
entity goal_node |
Definition at line 21 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_close_node(), pathlib_waypointpath(), pathlib_waypointpath_step(), pathlib_wpp_close(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
bool is_path_node |
Definition at line 24 of file pathlib.qh.
vector movenode_boxmax |
Definition at line 73 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_flynode(), pathlib_swimnode(), pathlib_walknode(), and pathlib_wateroutnode().
vector movenode_boxmin |
Definition at line 74 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_flynode(), pathlib_swimnode(), pathlib_walknode(), and pathlib_wateroutnode().
vector movenode_boxup |
Definition at line 72 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_walknode().
vector movenode_maxdrop |
Definition at line 71 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_walknode().
float movenode_stepsize |
Definition at line 69 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_walknode().
vector movenode_stepup |
Definition at line 70 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_walknode().
entity openlist |
Definition at line 18 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_cleanup(), pathlib_getbestopen(), pathlib_makenode_adaptive(), pathlib_mknode(), pathlib_waypointpath(), pathlib_wpp_bestopen(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
entity path_next |
Definition at line 8 of file pathlib.qh.
entity path_prev |
Definition at line 9 of file pathlib.qh.
float pathlib_bestcash_hits |
Definition at line 48 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_getbestopen().
float pathlib_bestcash_saved |
Definition at line 49 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_getbestopen().
float pathlib_bestopen_searched |
Definition at line 47 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_getbestopen().
float pathlib_closed_cnt |
Definition at line 43 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_close_node(), pathlib_waypointpath(), and pathlib_wpp_close().
float pathlib_foundgoal |
Definition at line 54 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_close_node(), pathlib_waypointpath(), pathlib_waypointpath_step(), pathlib_wpp_close(), pathlib_wpp_opencb(), pathlib_wpp_openncb(), and plas_think().
float pathlib_gridsize |
Definition at line 50 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_close_node(), pathlib_expandnode_box(), pathlib_expandnode_star(), pathlib_flynode(), pathlib_h_manhattan(), pathlib_nodeatpoint(), pathlib_swimnode(), pathlib_walknode(), pathlib_wateroutnode(), and tile_check_plus2().
entity pathlib_list |
Definition at line 7 of file pathlib.qh.
Referenced by pathlib_wpp_bestopen().
float pathlib_made_cnt |
Definition at line 44 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_mknode().
const float pathlib_maxtime = 60 |
Definition at line 57 of file pathlib.qh.
Referenced by pathlib_astar().
float pathlib_merge_cnt |
Definition at line 45 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_makenode_adaptive().
float pathlib_movecost |
Definition at line 51 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_expandnode_box(), pathlib_expandnode_star(), pathlib_h_diagonal(), pathlib_h_diagonal2(), pathlib_h_diagonal2sdp(), pathlib_h_diagonal3(), and pathlib_waypointpath().
float pathlib_movecost_diag |
Definition at line 52 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_expandnode_star(), pathlib_h_diagonal2(), pathlib_h_diagonal2sdp(), pathlib_h_diagonal3(), and pathlib_waypointpath().
float pathlib_movecost_waterfactor |
Definition at line 53 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_g_euclidean_water(), and pathlib_g_static_water().
bool pathlib_movenode_goodnode |
Definition at line 75 of file pathlib.qh.
Referenced by buildpath_nodefilter_moveskip(), pathlib_close_node(), pathlib_flynode(), pathlib_makenode_adaptive(), pathlib_swimnode(), pathlib_walknode(), and pathlib_wateroutnode().
float pathlib_node_c |
Definition at line 28 of file pathlib.qh.
Definition at line 34 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 35 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 36 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 33 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 37 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 38 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 31 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 39 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
Definition at line 32 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), and tile_check_plus2().
const float pathlib_node_edgeflag_unknown = 0 |
Definition at line 30 of file pathlib.qh.
Referenced by pathlib_expandnode_star().
float pathlib_node_edgeflags |
Definition at line 40 of file pathlib.qh.
float pathlib_node_f |
Definition at line 27 of file pathlib.qh.
float pathlib_node_g |
Definition at line 25 of file pathlib.qh.
float pathlib_node_h |
Definition at line 26 of file pathlib.qh.
float pathlib_open_cnt |
Definition at line 42 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_close_node(), pathlib_expandnode_box(), pathlib_expandnode_star(), pathlib_getbestopen(), pathlib_mknode(), pathlib_waypointpath(), pathlib_wpp_close(), pathlib_wpp_opencb(), and pathlib_wpp_openncb().
float pathlib_searched_cnt |
Definition at line 46 of file pathlib.qh.
Referenced by pathlib_astar(), pathlib_makenode_adaptive(), pathlib_nodeatpoint(), and pathlib_waypointpath().
float pathlib_starttime |
Definition at line 56 of file pathlib.qh.
Referenced by pathlib_astar(), and pathlib_waypointpath().
const vector PLIB_FORWARD = '0 1 0' |
Definition at line 13 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), tile_check_cross(), tile_check_plus(), and tile_check_plus2().
const vector PLIB_RIGHT = '1 0 0' |
Definition at line 15 of file pathlib.qh.
Referenced by pathlib_expandnode_star(), tile_check_cross(), tile_check_plus(), and tile_check_plus2().
entity start_node |
Definition at line 22 of file pathlib.qh.
Referenced by pathlib_waypointpath(), and pathlib_waypointpath_step().
vector tile_check_down |
Definition at line 62 of file pathlib.qh.
Referenced by pathlib_astar(), tile_check_cross(), tile_check_plus(), and tile_check_plus2().
float tile_check_size |
Definition at line 63 of file pathlib.qh.
Referenced by pathlib_astar(), tile_check_cross(), and tile_check_plus().
vector tile_check_up |
Definition at line 61 of file pathlib.qh.
Referenced by pathlib_astar(), tile_check_cross(), tile_check_plus(), and tile_check_plus2().