From 4c9fd9590a12ecec4e6b164ced32f3152115e27a Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 24 Feb 2023 11:01:57 +1000 Subject: [PATCH] Work around trigger_hurt not being detected by tracebox on geit3ctf1 --- qcsrc/lib/warpzone/common.qc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 429f6a117..ac32cffdd 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -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; } -- 2.39.2