]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/debug.qh
Merge branch 'terencehill/spectate_player' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / debug.qh
index 583e626af72fa73e90993f78208964090a47b65e..c95bb2d73cf95e458a66485679e06b74f79357e5 100644 (file)
@@ -197,7 +197,7 @@ bool autocvar_debugdraw;
 #endif
 
 
-GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
+GENERIC_COMMAND(bufstr_get, "Examine a string buffer object", false)
 {
        switch (request)
        {
@@ -205,8 +205,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
                {
                        int bufhandle = stof(argv(1));
                        int string_index = stof(argv(2));
-                       string s = bufstr_get(bufhandle, string_index);
-                       LOG_INFOF("%s", s);
+                       LOG_INFO(bufstr_get(bufhandle, string_index));
                        return;
                }
 
@@ -220,7 +219,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
 }
 
 
-GENERIC_COMMAND(version, "Print the current version")
+GENERIC_COMMAND(version, "Print the current version", false)
 {
        switch (request)
        {
@@ -242,7 +241,7 @@ GENERIC_COMMAND(version, "Print the current version")
 #ifdef CSQC
 void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
 #endif
-GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars")
+GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars", false)
 {
        switch (request)
        {
@@ -296,7 +295,7 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame)
                        it.solid = SOLID_BBOX;
                });
                vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
-               MAKEVECTORS(makevectors, it.v_angle, forward, right, up);
+               MAKE_VECTORS(it.v_angle, forward, right, up);
                vector pos = it.origin + it.view_ofs;
                traceline(pos, pos + forward * max_shot_distance, MOVE_NORMAL, it);
                FOREACH_ENTITY(true, {
@@ -333,7 +332,7 @@ STATIC_INIT(TRACE_ENT)
 #endif
 
 
-GENERIC_COMMAND(find, "Search through entities for matching classname")
+GENERIC_COMMAND(find, "Search through entities for matching classname", false)
 {
        switch (request)
        {
@@ -364,7 +363,7 @@ GENERIC_COMMAND(find, "Search through entities for matching classname")
 }
 
 
-GENERIC_COMMAND(findat, "Search through entities for matching origin")
+GENERIC_COMMAND(findat, "Search through entities for matching origin", false)
 {
        switch (request)
        {
@@ -407,7 +406,7 @@ CLASS(DebugText3d, Object)
                CONSTRUCT(DebugText3d);
                this.origin = pos;
                this.message = strzone(msg);
-               SetResourceAmount(this, RESOURCE_HEALTH, align);
+               SetResource(this, RES_HEALTH, align);
                this.hit_time = time;
                this.fade_rate = fade_rate_;
                this.velocity = vel;
@@ -432,7 +431,7 @@ CLASS(DebugText3d, Object)
                if (screen_pos.z < 0) return; // behind camera
 
                screen_pos.z = 0;
-               float align = GetResourceAmount(this, RESOURCE_HEALTH);
+               float align = GetResource(this, RES_HEALTH);
                string msg;
                vector msg_pos;