]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable pathlib debug to suppress model warnings
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 13 Mar 2016 09:33:00 +0000 (20:33 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 13 Mar 2016 09:33:00 +0000 (20:33 +1100)
qcsrc/server/pathlib/_all.inc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/pathlib.qh

index 1b15654e4a8dceba366ab6730a7a8b4c6ba90f2f..7a06615bf34111960753aa2d0a24ad1163cf5265 100644 (file)
@@ -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
index c78fc9320d771ec58357013d9920ea646dacd082..f2534805764968c5e2ba2ba215a9f2372274fd56 100644 (file)
@@ -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");
index 765fe2a7f201b6bfa6b1e1da7e70c0cac3284d31..5c331d4b404fc035ba83bbb14497e4b952e347b7 100644 (file)
@@ -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