From 730dbd22c093ce25fa7875cbb641e66de0dd2a02 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Fri, 17 Feb 2023 07:34:28 +0000 Subject: [PATCH] Use same jump pad trajectory origin as Q3 on Q3 maps, make that optional for Xonotic maps --- qcsrc/common/mapobjects/trigger/jumppads.qc | 7 ++----- qcsrc/common/mapobjects/trigger/jumppads.qh | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index eee980618..ecc80f4ad 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -135,11 +135,8 @@ bool jumppad_push(entity this, entity targ) vector org = targ.origin; - if(STAT(Q3COMPAT)) - { - org.z += targ.mins_z; - org.z += 1; // off by 1! - } + if(Q3COMPAT_COMMON || this.spawnflags & PUSH_STATIC) + org = (this.absmin + this.absmax) * 0.5; if(this.enemy) { diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qh b/qcsrc/common/mapobjects/trigger/jumppads.qh index 268134e80..c994bc610 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qh +++ b/qcsrc/common/mapobjects/trigger/jumppads.qh @@ -3,6 +3,7 @@ const int PUSH_ONCE = BIT(0); // legacy, deactivate with relay instead const int PUSH_SILENT = BIT(1); // not used? +const int PUSH_STATIC = BIT(12); // xonotic-only, Q3 already behaves like this by default IntrusiveList g_jumppads; STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); } -- 2.39.2