X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Flib%2Fwarpzone%2Fcommon.qc;h=5a3929e1e92d58ecd6520f0bbb05d68499e61f73;hp=90e3cd76c983a803a552b32ed7af220aaccb6b6e;hb=21fdd7bdfc222142ffd047a200cb2bd214c5d511;hpb=06ac66a5edaa645e19ed9a6482409e8656a65b1d diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 90e3cd76c9..5a3929e1e9 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -154,31 +154,33 @@ float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig) entity WarpZone_Find(vector mi, vector ma) { // if we are near any warpzone planes - MOVE AWAY (work around nearclip) - entity e; if(!warpzone_warpzones_exist) return NULL; - for(e = NULL; (e = find(e, classname, "trigger_warpzone")); ) - if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, NULL)) - return e; + IL_EACH(g_warpzones, WarpZoneLib_BoxTouchesBrush(mi, ma, it, NULL), + { + return it; + }); return NULL; } void WarpZone_MakeAllSolid() { - entity e; if(!warpzone_warpzones_exist) return; - for(e = NULL; (e = find(e, classname, "trigger_warpzone")); ) - e.solid = SOLID_BSP; + IL_EACH(g_warpzones, true, + { + it.solid = SOLID_BSP; + }); } void WarpZone_MakeAllOther() { - entity e; if(!warpzone_warpzones_exist) return; - for(e = NULL; (e = find(e, classname, "trigger_warpzone")); ) - e.solid = SOLID_TRIGGER; + IL_EACH(g_warpzones, true, + { + it.solid = SOLID_TRIGGER; + }); } void WarpZone_Trace_InitTransform()