From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Fri, 17 Feb 2023 07:34:28 +0000 (+0000) Subject: Use same jump pad trajectory origin as Q3 on Q3 maps, make that optional for Xonotic... X-Git-Tag: xonotic-v0.8.6~168^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=730dbd22c093ce25fa7875cbb641e66de0dd2a02;p=xonotic%2Fxonotic-data.pk3dir.git Use same jump pad trajectory origin as Q3 on Q3 maps, make that optional for Xonotic maps --- 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(); }