From: TimePath Date: Sun, 13 Mar 2016 09:33:00 +0000 (+1100) Subject: Disable pathlib debug to suppress model warnings X-Git-Tag: xonotic-v0.8.2~1098 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a20354021c6053ef7de8e6395d6624adea4a76ac;p=xonotic%2Fxonotic-data.pk3dir.git Disable pathlib debug to suppress model warnings --- diff --git a/qcsrc/server/pathlib/_all.inc b/qcsrc/server/pathlib/_all.inc index 1b15654e4..7a06615bf 100644 --- a/qcsrc/server/pathlib/_all.inc +++ b/qcsrc/server/pathlib/_all.inc @@ -1,4 +1,6 @@ -#define DEBUGPATHING +#ifndef DEBUGPATHING + #define DEBUGPATHING 0 +#endif #include "costs.qc" #include "expandnode.qc" @@ -6,6 +8,6 @@ #include "movenode.qc" #include "path_waypoint.qc" #include "utility.qc" -#ifdef DEBUGPATHING +#if DEBUGPATHING #include "debug.qc" #endif diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index c78fc9320..f25348057 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -26,13 +26,12 @@ void dumpnode(entity n) n.nextthink = time; } -#ifdef DEBUGPATHING +#if DEBUGPATHING void pathlib_showpath(entity start); void pathlib_showpath2(entity path); +void pathlib_showsquare(vector where,float goodsquare,float _lifetime); #endif -void pathlib_showsquare(vector where,float goodsquare,float _lifetime); -void pathlib_showsquare2(entity node ,vector ncolor,float align); entity pathlib_mknode(vector where,entity parent) { @@ -60,8 +59,9 @@ entity pathlib_mknode(vector where,entity parent) setorigin(node, where); node.medium = pointcontents(where); +#if DEBUGPATHING pathlib_showsquare(where, 1 ,15); - +#endif ++pathlib_made_cnt; ++pathlib_open_cnt; @@ -157,7 +157,9 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go if (!tile_check(where)) { LOG_TRACE("tile_check fail\n"); +#if DEBUGPATHING pathlib_showsquare(where, 0 ,30); +#endif return 0; } @@ -545,7 +547,7 @@ entity pathlib_astar(vector from,vector to) ctime = gettime(GETTIME_REALTIME) - ctime; -#ifdef DEBUGPATHING +#if DEBUGPATHING pathlib_showpath2(start); LOG_TRACE("Time used - pathfinding: ", ftos(ptime),"\n"); diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index 765fe2a7f..5c331d4b4 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -13,7 +13,7 @@ const vector PLIB_FORWARD = '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