]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Work around trigger_hurt not being detected by tracebox on geit3ctf1
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 24 Feb 2023 01:01:57 +0000 (11:01 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 18 May 2023 15:35:25 +0000 (01:35 +1000)
qcsrc/lib/warpzone/common.qc

index 429f6a1175a37f792c62155c02f1b5e39b56e7c2..ac32cffdd0f90c703f352428073e8428a3904fd8 100644 (file)
@@ -140,11 +140,19 @@ float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig)
        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;
        e.solid = SOLID_BSP;
        f = WarpZoneLib_BoxTouchesBrush_Recurse(mi, ma, e, ig);
        e.solid = s;
 
+       if (Q3COMPAT_COMMON && ig != world)
+               ig.dphitcontentsmask &= ~128;
+
        return f;
 }