]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Debugdraw: classname filter
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 4 Dec 2015 04:09:40 +0000 (15:09 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 4 Dec 2015 04:10:01 +0000 (15:10 +1100)
qcsrc/common/debug.qh

index 76f582ee7720c8e59bc4c8ec0e8266076c0169a0..25dc11d1c391f2e2e1907cb0a868dd47f1169371 100644 (file)
@@ -43,6 +43,7 @@ REGISTER_NET_TEMP(net_debug)
 bool autocvar_debugdraw;
 
 #ifdef CSQC
+       string autocvar_debugdraw_filter;
        .int debugdraw_last;
        vector project_3d_to_2d(vector vec);
        void Debug_Draw()
@@ -59,6 +60,7 @@ bool autocvar_debugdraw;
                                if (e.debugdraw_last == debugdraw_frame) continue;
                                e.debugdraw_last = debugdraw_frame;
                                vector rgb = (e.debug) ? '0 0 1' : '1 0 0';
+                               if (autocvar_debugdraw_filter != "" && !strhasword(autocvar_debugdraw_filter, e.classname)) continue;
                                if (is_pure(e))
                                {
                                        if (autocvar_debugdraw < 2) continue;