]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use same jump pad trajectory origin as Q3 on Q3 maps, make that optional for Xonotic...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Fri, 17 Feb 2023 07:34:28 +0000 (07:34 +0000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 17 Feb 2023 07:34:28 +0000 (07:34 +0000)
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/mapobjects/trigger/jumppads.qh

index eee980618d8b2b47341963aeed3e34b54556ba6d..ecc80f4ad668e1f695542196bc8b0b3760c3a5a3 100644 (file)
@@ -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)
        {
index 268134e806757aa4f459295ad818bb4a8db013bc..c994bc61085b5971ee3c32aa7ea19e9b8d81e56a 100644 (file)
@@ -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(); }