- for (entity e = findradius(it.origin, 100); e; e = e.chain)
- {
- 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))
+ FOREACH_ENTITY_RADIUS(it.origin, 100, it.debugdraw_last != debugdraw_frame, {
+ it.debugdraw_last = debugdraw_frame;
+ vector rgb = (it.debug) ? '0 0 1' : '1 0 0';
+ if (autocvar_debugdraw_filterout != "" && strhasword(autocvar_debugdraw_filterout, it.classname)) continue;
+ if (autocvar_debugdraw_filter != "" && !strhasword(autocvar_debugdraw_filter, it.classname)) continue;
+ if (autocvar_debugdraw == 3)
+ {
+ if (!it.entnum) continue;
+ }
+ if (autocvar_debugdraw == 4)
+ {
+ if (it.origin) continue;
+ }
+ if (autocvar_debugdraw == 5)
+ {
+ if (!it.debug) continue;
+ }
+ else if (autocvar_debugdraw > 5)
+ {
+ bool flag = true;
+ do {
+// if (it.modelindex) break;
+// if (it.absmin) break;
+// if (it.absmax) break;
+// if (it.entnum) break;
+// if (it.drawmask) break;
+// if (it.predraw) break;
+// if (it.movetype) break;
+ if (it.solid) break;
+// if (it.origin) break;
+// if (it.oldorigin) break;
+// if (it.velocity) break;
+// if (it.angles) break;
+// if (it.avelocity) break;
+// if (it.classname) break;
+// if (it.model) break;
+// if (it.frame) break;
+// if (it.skin) break;
+// if (it.effects) break;
+// if (it.mins) break;
+// if (it.maxs) break;
+// if (it.size) break;
+// if (it.touch) break;
+// if (it.use) break;
+// if (it.think) break;
+// if (it.blocked) break;
+// if (it.nextthink) break;
+// if (it.chain) break;
+// if (it.netname) break;
+// if (it.enemy) break;
+// if (it.flags) break;
+// if (it.colormap) break;
+// if (it.owner) break;
+ flag = false;
+ } while (0);
+ if (!flag) continue;
+ }
+ else if (is_pure(it))