From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 31 Jan 2023 04:24:48 +0000 (+0100) Subject: q3df compat: do not repeatedly play jump pad effect while inside a trigger_push_veloc... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=457e128273ebac564b8d651b5192cef8b88ca596;p=xonotic%2Fxonotic-data.pk3dir.git q3df compat: do not repeatedly play jump pad effect while inside a trigger_push_velocity regardless of flags and other minor improvements --- diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index 10addb088..82192ea66 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -278,7 +278,7 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad) } } - if(!is_pushed && ((this.spawnflags & ADD_XY) || (this.spawnflags & ADD_Z))) // remember jump pads which boost on initial touch + if(!is_pushed) // remember velocity jump pads { bool limit_reached = true; for(int i = 0; i < MAX_PUSHED; ++i) @@ -342,7 +342,7 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad) } } - if(!is_pushed || !(this.spawnflags & ADD_Z)) UNSET_ONGROUND(targ); + if(!is_pushed) 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.spawnflags & ADD_XY) && (this.spawnflags & ADD_Z))) && this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0')) + if(!is_pushed && this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0')) { // flash when activated Send_Effect(EFFECT_JUMPPAD, targ.origin, targ.velocity, 1); @@ -845,8 +845,6 @@ spawnfunc(trigger_push) */ spawnfunc(trigger_push_velocity) { - SetMovedir(this); - trigger_init(this); this.active = ACTIVE_ACTIVE;