]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill a couple of FOREACH_ENTITY_ENT cases
authorMario <mario@smbclan.net>
Sun, 21 Aug 2016 17:03:55 +0000 (03:03 +1000)
committerMario <mario@smbclan.net>
Sun, 21 Aug 2016 17:03:55 +0000 (03:03 +1000)
qcsrc/common/mutators/mutator/nades/nades.qc

index d15353745e694868381c0aaf589e015c697c78ad..37f1cab8213ce06f85adb1a28aba53a080d93d06 100644 (file)
@@ -730,10 +730,9 @@ void nade_boom(entity this)
                case NADE_TYPE_ENTRAP: nade_entrap_boom(this); break;
        }
 
-       FOREACH_ENTITY_ENT(aiment, this,
+       IL_EACH(g_projectiles, it.classname == "grapplinghook" && it.aiment == this,
        {
-               if(it.classname == "grapplinghook")
-                       RemoveGrapplingHook(it.realowner);
+               RemoveGrapplingHook(it.realowner);
        });
 
        delete(this);
@@ -780,10 +779,9 @@ void nade_touch(entity this, entity toucher)
                is_weapclip = 1;*/
        if(ITEM_TOUCH_NEEDKILL()) // || is_weapclip)
        {
-               FOREACH_ENTITY_ENT(aiment, this,
+               IL_EACH(g_projectiles, it.classname == "grapplinghook" && it.aiment == this,
                {
-                       if(it.classname == "grapplinghook")
-                               RemoveGrapplingHook(it.realowner);
+                       RemoveGrapplingHook(it.realowner);
                });
                delete(this);
                return;