]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
q3df compat: minor improvements to make trigger_push_velocity behaviour more consiste...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 30 Jan 2023 03:16:12 +0000 (04:16 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 30 Jan 2023 03:16:12 +0000 (04:16 +0100)
qcsrc/common/mapobjects/trigger/jumppads.qc

index da2f8dc0b1ddd29daa173eeb5f505b7b84fa9fb1..10addb088ab2577cb32da7b5c87087aa8a33470c 100644 (file)
@@ -342,7 +342,7 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad)
                }
        }
 
-       if(!is_pushed) UNSET_ONGROUND(targ);
+       if(!is_pushed || !(this.spawnflags & ADD_Z)) UNSET_ONGROUND(targ);
 
 #ifdef CSQC
        if (targ.flags & FL_PROJECTILE)
@@ -370,7 +370,7 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad)
 
                // prevent sound spam when a player hits the jumppad more than once
                // or when a dead player gets stuck in the jumppad for some reason
-               if(!is_pushed && this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0'))
+               if((!is_pushed || !((this.spawnflags & ADD_XY) && (this.spawnflags & ADD_Z))) && this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0'))
                {
                        // flash when activated
                        Send_Effect(EFFECT_JUMPPAD, targ.origin, targ.velocity, 1);