]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
FOREACH_ENTITY_RADIUS
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index ef7438c96a186f8f3e4c42c9ba2c03fc07739a11..1d3ce373d2bed7970caf3f3a3e8b7c917978ab8a 100644 (file)
@@ -1155,16 +1155,12 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
 
                if(autocvar_spawn_debug >= 2)
                {
-                       for(entity otheritem = findradius(this.origin, 3); otheritem; otheritem = otheritem.chain)
-                       {
-                           // why not flags & fl_item?
-                               if(otheritem.is_item)
-                               {
-                                       LOG_TRACE("XXX Found duplicated item: ", itemname, vtos(this.origin));
-                                       LOG_TRACE(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
-                                       error("Mapper sucks.");
-                               }
-                       }
+            // why not flags & fl_item?
+                   FOREACH_ENTITY_RADIUS(this.origin, 3, it.is_item, {
+                LOG_TRACE("XXX Found duplicated item: ", itemname, vtos(this.origin));
+                LOG_TRACE(" vs ", it.netname, vtos(it.origin), "\n");
+                error("Mapper sucks.");
+            });
                        this.is_item = true;
                }