From: Mario Date: Sun, 21 Aug 2016 17:03:55 +0000 (+1000) Subject: Kill a couple of FOREACH_ENTITY_ENT cases X-Git-Tag: xonotic-v0.8.2~663^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9ad087416f1a4ca45895ec949a568acc57923d70;p=xonotic%2Fxonotic-data.pk3dir.git Kill a couple of FOREACH_ENTITY_ENT cases --- diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index d15353745..37f1cab82 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -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;