From: Mario Date: Sun, 31 May 2020 12:37:49 +0000 (+1000) Subject: Offset exact trigger testing by a single QU to account for the engine's default offse... X-Git-Tag: xonotic-v0.8.5~983 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=8b2d2647080d03fc3497efddfa4bf91f64f6d4e1 Offset exact trigger testing by a single QU to account for the engine's default offsetting, fixes #2455 --- 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); }