]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
q3compat: Fix some nexuiz maps that rely on adjacent bboxes counting as touching
authorbones_was_here <bones_was_here@xa.org.au>
Fri, 11 Sep 2020 10:57:25 +0000 (20:57 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Fri, 11 Sep 2020 10:57:25 +0000 (20:57 +1000)
qcsrc/lib/warpzone/common.qc

index 830c56de65f0cca4834131760898e93b9a148006..34c7bb2ba8652e959ee2898c66dedb37a42e0e95 100644 (file)
@@ -787,10 +787,13 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me)
 bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher)
 {
        vector emin = toucher.absmin, emax = toucher.absmax;
-       // the engine offsets absolute bounding boxes by a single quake unit
-       // we must undo that here to allow accurate touching
-       emin += '1 1 1';
-       emax -= '1 1 1';
+       if(STAT(Q3COMPAT))
+       {
+               // DP's tracebox enlarges absolute bounding boxes by a single quake unit
+               // we must undo that here to allow accurate touching
+               emin += '1 1 1';
+               emax -= '1 1 1';
+       }
        return !WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher);
 }