X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fpathlib%2Fdebug.qc;h=13dbda5200b7fbbb48a7329a8d4b1407a4922892;hb=761fb981d742f869d7057a3bb7e3369329fdbe18;hp=abdfcbaed88087254fe4e0e1eabab38943ef6d2e;hpb=724a41faf2cbfd86d41f3ab59ff8326a831a8326;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/pathlib/debug.qc b/qcsrc/server/pathlib/debug.qc index abdfcbaed..13dbda520 100644 --- a/qcsrc/server/pathlib/debug.qc +++ b/qcsrc/server/pathlib/debug.qc @@ -1,4 +1,6 @@ -#include "pathlib.qh" +#include "debug.qh" + +#if DEBUGPATHING MODEL(SQUARE, "models/pathlib/square.md3"); MODEL(SQUARE_GOOD, "models/pathlib/goodsquare.md3"); @@ -6,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 #endif void pathlib_showpath(entity start) @@ -22,32 +22,32 @@ 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) { - self.path_next.think = __showpath2_think; - self.path_next.nextthink = time + 0.15; + setthink(this.path_next, __showpath2_think); + this.path_next.nextthink = time + 0.15; } else { - self.owner.think = __showpath2_think; - self.owner.nextthink = time + 0.15; + setthink(this.owner, __showpath2_think); + this.owner.nextthink = time + 0.15; } } void pathlib_showpath2(entity path) { - path.think = __showpath2_think; + setthink(path, __showpath2_think); path.nextthink = time; } @@ -59,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) @@ -81,7 +81,7 @@ void pathlib_showsquare(vector where,float goodsquare,float _lifetime) s = spawn(); s.alpha = 0.25; - s.think = SUB_Remove_self; + setthink(s, SUB_Remove); s.nextthink = _lifetime; s.scale = pathlib_gridsize / 512.001; s.solid = SOLID_NOT; @@ -92,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) @@ -106,11 +106,11 @@ void pathlib_showedge(vector where,float _lifetime,float rot) e = spawn(); e.alpha = 0.25; - e.think = 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); @@ -118,3 +118,5 @@ void pathlib_showedge(vector where,float _lifetime,float rot) //e.angles_x += 90; } + +#endif