]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/pathlib/debug.qc
Merge branch 'Lyberta/AssaultIcons' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / pathlib / debug.qc
index 09b81724ec1168ac49046317fb873c9c18e06f85..13dbda5200b7fbbb48a7329a8d4b1407a4922892 100644 (file)
@@ -1,5 +1,6 @@
 #include "debug.qh"
-#include "pathlib.qh"
+
+#if DEBUGPATHING
 
 MODEL(SQUARE,       "models/pathlib/square.md3");
 MODEL(SQUARE_GOOD,  "models/pathlib/goodsquare.md3");
@@ -7,9 +8,7 @@ MODEL(SQUARE_BAD,   "models/pathlib/badsquare.md3");
 MODEL(EDGE,         "models/pathlib/edge.md3");
 
 #ifdef TURRET_DEBUG
-void mark_error(vector where,float lifetime);
-void mark_info(vector where,float lifetime);
-entity mark_misc(vector where,float lifetime);
+#include <common/turrets/util.qh>
 #endif
 
 void pathlib_showpath(entity start)
@@ -32,17 +31,17 @@ void path_dbg_think(entity this)
 void __showpath2_think(entity this)
 {
     #ifdef TURRET_DEBUG
-       mark_info(self.origin,1);
+       mark_info(this.origin,1);
        #endif
-    if(self.path_next)
+    if(this.path_next)
     {
-        setthink(self.path_next, __showpath2_think);
-        self.path_next.nextthink = time + 0.15;
+        setthink(this.path_next, __showpath2_think);
+        this.path_next.nextthink = time + 0.15;
     }
     else
     {
-        setthink(self.owner, __showpath2_think);
-        self.owner.nextthink = time + 0.15;
+        setthink(this.owner, __showpath2_think);
+        this.owner.nextthink = time + 0.15;
     }
 }
 
@@ -60,7 +59,7 @@ void pathlib_showsquare2(entity node ,vector ncolor,float align)
     node.solid     = SOLID_NOT;
 
     setmodel(node, MDL_SQUARE);
-    setorigin(node,node.origin);
+    setorigin(node, node.origin);
     node.colormod = ncolor;
 
     if(align)
@@ -93,7 +92,7 @@ void pathlib_showsquare(vector where,float goodsquare,float _lifetime)
 
     s.angles = vectoangles(trace_plane_normal);
     s.angles_x -= 90;
-    setorigin(s,where);
+    setorigin(s, where);
 }
 
 void pathlib_showedge(vector where,float _lifetime,float rot)
@@ -111,7 +110,7 @@ void pathlib_showedge(vector where,float _lifetime,float rot)
     e.nextthink = _lifetime;
     e.scale     = pathlib_gridsize / 512;
     e.solid     = SOLID_NOT;
-    setorigin(e,where);
+    setorigin(e, where);
     setmodel(e, MDL_EDGE);
     //traceline(where + '0 0 32',where - '0 0 128',MOVE_WORLDONLY,e);
     //e.angles = vectoangles(trace_plane_normal);
@@ -119,3 +118,5 @@ void pathlib_showedge(vector where,float _lifetime,float rot)
     //e.angles_x += 90;
 
 }
+
+#endif