]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/superspec/superspec.qc
Merge branch 'terencehill/connection_msg_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / superspec / superspec.qc
index 887b1842345098eb42b9d70d2468feb04a0be58c..3c183c726f0823722f0d78950aea46ad55862c05 100644 (file)
@@ -101,10 +101,10 @@ MUTATOR_HOOKFUNCTION(superspec, ItemTouch)
 {SELFPARAM();
        entity _item = self;
 
-       entity e;
-       FOR_EACH_CLIENT(e) if (IS_SPEC(e) || IS_OBSERVER(e))
-       {
-               setself(e);
+       FOREACH_CLIENT(true, LAMBDA(
+               if(!IS_SPEC(it) && !IS_OBSERVER(it))
+                       continue;
+               setself(it);
                if(self.superspec_flags & SSF_ITEMMSG)
                        if(superspec_filteritem(self, _item))
                        {
@@ -144,7 +144,7 @@ MUTATOR_HOOKFUNCTION(superspec, ItemTouch)
                                }
                        }
                }
-       }
+       ));
 
        setself(this);