]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/jumppads.qc
Merge remote-tracking branch 'origin/master' into morosophos/server-current4
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / jumppads.qc
index f7281e5e4ae2619098dffa22cefb386b9236105f..4dc68505740a7a1decf0dc9a21f62e98c7123db5 100644 (file)
@@ -249,8 +249,23 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad)
 
        vector org = targ.origin;
 
-       if(Q3COMPAT_COMMON || this.spawnflags & PUSH_STATIC)
+       if(STAT(Q3COMPAT, targ) || this.spawnflags & PUSH_STATIC)
+       {
                org = (this.absmin + this.absmax) * 0.5;
+       }
+
+       bool already_pushed = false;
+       if(is_velocity_pad) // remember velocity jump pads
+       {
+               if(this == targ.last_pushed || (targ.last_pushed && !STAT(Q3COMPAT, targ))) // if q3compat is active overwrite last stored jump pad, otherwise ignore
+               {
+                       already_pushed = true;
+               }
+               else
+               {
+                       targ.last_pushed = this; // may be briefly out of sync between client and server if client prediction is toggled
+               }
+       }
 
        bool already_pushed = false;
        if(is_velocity_pad) // remember velocity jump pads