From 8b2d2647080d03fc3497efddfa4bf91f64f6d4e1 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 31 May 2020 22:37:49 +1000 Subject: [PATCH] Offset exact trigger testing by a single QU to account for the engine's default offsetting, fixes #2455 --- qcsrc/lib/warpzone/common.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 3bff39be1..120551b4e 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -786,7 +786,12 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me) bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher) { - return !WarpZoneLib_BoxTouchesBrush(toucher.absmin, toucher.absmax, this, 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'; + return !WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher); } -- 2.39.2