From: TimePath Date: Fri, 4 Dec 2015 04:09:40 +0000 (+1100) Subject: Debugdraw: classname filter X-Git-Tag: xonotic-v0.8.2~1566 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=16d6ec38d2ddf13a0880b9cd50a3968c48da8f8a;p=xonotic%2Fxonotic-data.pk3dir.git Debugdraw: classname filter --- diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 76f582ee7..25dc11d1c 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -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;