X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fpathlib%2Fpathlib.qh;h=dbf785266ae67a266a1b9d9c4f66ebac245fc60c;hp=d1b6667d715f4a6075f992f999ceb846a608e339;hb=a97b89297fa91ae42b9d56c262662eb34ede3e45;hpb=94579b4c440f739c1203ea5e546d3fcadb884c51 diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index d1b6667d71..dbf785266a 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -1,3 +1,6 @@ +#ifndef PATHLIB_H +#define PATHLIB_H + .entity pathlib_list; .entity path_next; .entity path_prev; @@ -5,9 +8,9 @@ #define inwater(point) (pointcontents(point) == CONTENT_WATER) #define medium spawnshieldtime -#define PLIB_FORWARD '0 1 0' +const vector PLIB_FORWARD = '0 1 0'; //#define PLIB_BACK '0 -1 0' -#define PLIB_RIGHT '1 0 0' +const vector PLIB_RIGHT = '1 0 0'; //#define PLIB_LEFT '-1 0 0' #define DEBUGPATHING @@ -28,16 +31,16 @@ entity start_node; .float pathlib_node_f; .float pathlib_node_c; -#define pathlib_node_edgeflag_unknown 0 -#define pathlib_node_edgeflag_left 2 -#define pathlib_node_edgeflag_right 4 -#define pathlib_node_edgeflag_forward 8 -#define pathlib_node_edgeflag_back 16 -#define pathlib_node_edgeflag_backleft 32 -#define pathlib_node_edgeflag_backright 64 -#define pathlib_node_edgeflag_forwardleft 128 -#define pathlib_node_edgeflag_forwardright 256 -#define pathlib_node_edgeflag_none 512 +const float pathlib_node_edgeflag_unknown = 0; +const float pathlib_node_edgeflag_left = 2; +const float pathlib_node_edgeflag_right = 4; +const float pathlib_node_edgeflag_forward = 8; +const float pathlib_node_edgeflag_back = 16; +const float pathlib_node_edgeflag_backleft = 32; +const float pathlib_node_edgeflag_backright = 64; +const float pathlib_node_edgeflag_forwardleft = 128; +const float pathlib_node_edgeflag_forwardright = 256; +const float pathlib_node_edgeflag_none = 512; .float pathlib_node_edgeflags; float pathlib_open_cnt; @@ -55,7 +58,7 @@ float pathlib_movecost_waterfactor; float pathlib_foundgoal; float pathlib_starttime; -#define pathlib_maxtime 60 +const float pathlib_maxtime = 60; entity best_open_node; @@ -110,9 +113,4 @@ var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev); #include "debug.qc" #endif -#include "utility.qc" -#include "movenode.qc" -#include "costs.qc" -#include "expandnode.qc" -#include "main.qc" -#include "path_waypoint.qc" +#endif