]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/pathlib/debug.qc
Merge branch 'master' into terencehill/hud_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / pathlib / debug.qc
index fff4b606c65e2a718b84f26aa65674228fd74dea..b84ae6414e20ba637d8f81c86bf946040bf37cb5 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");
@@ -23,26 +24,26 @@ void pathlib_showpath(entity start)
     }
 }
 
-void path_dbg_think()
-{SELFPARAM();
-    pathlib_showpath(self);
-    self.nextthink = time + 1;
+void path_dbg_think(entity this)
+{
+    pathlib_showpath(this);
+    this.nextthink = time + 1;
 }
 
-void __showpath2_think()
-{SELFPARAM();
+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 +61,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)
@@ -82,7 +83,7 @@ void pathlib_showsquare(vector where,float goodsquare,float _lifetime)
 
     s           = spawn();
     s.alpha     = 0.25;
-    setthink(s, SUB_Remove_self);
+    setthink(s, SUB_Remove);
     s.nextthink = _lifetime;
     s.scale     = pathlib_gridsize / 512.001;
     s.solid     = SOLID_NOT;
@@ -93,7 +94,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)
@@ -107,11 +108,11 @@ void pathlib_showedge(vector where,float _lifetime,float rot)
 
     e           = spawn();
     e.alpha     = 0.25;
-    setthink(e, SUB_Remove_self);
+    setthink(e, SUB_Remove);
     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 +120,5 @@ void pathlib_showedge(vector where,float _lifetime,float rot)
     //e.angles_x += 90;
 
 }
+
+#endif