- s = e.solid;
- e.solid = SOLID_BSP;
- WarpZoneLib_BoxTouchesBrush_mins = mi;
- WarpZoneLib_BoxTouchesBrush_maxs = ma;
- WarpZoneLib_BoxTouchesBrush_ent = e;
- WarpZoneLib_BoxTouchesBrush_ignore = ig;
- f = WarpZoneLib_BoxTouchesBrush_Recurse();
- e.solid = s;
+ if(!e.modelindex || e.warpzone_isboxy)
+ return 1;
+
+ // work around trigger_hurt on geit3ctf1 not being detected by tracebox
+ // bones_was_here: FIXME: WHY do these triggers only have supercontents == 128 ?!
+ if (Q3COMPAT_COMMON && ig != world)
+ ig.dphitcontentsmask |= 128;
+
+ s = e.solid;
+ if (e.solid != SOLID_BSP)
+ {
+ e.solid = SOLID_BSP;
+ setorigin(e, e.origin); // update linking
+ }
+ f = WarpZoneLib_BoxTouchesBrush_Recurse(mi, ma, e, ig);
+ if (e.solid != s) // if we needed to change .solid temporarily
+ {
+ e.solid = s; // restore it
+ setorigin(e, e.origin); // update linking
+ }