]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Attempt to prevent sound spam when a dead player gets stuck in the jumppad for some...
authorterencehill <piuntn@gmail.com>
Wed, 28 Oct 2020 00:27:00 +0000 (01:27 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 28 Oct 2020 00:27:00 +0000 (01:27 +0100)
qcsrc/common/mapobjects/trigger/jumppads.qc

index a6128d207fb8c334d092dcee26cd41ab261186cb..06842395bdd81f361a90d137bdc4a9e1a2b5e1be 100644 (file)
@@ -192,7 +192,9 @@ bool jumppad_push(entity this, entity targ)
                // reset tracking of oldvelocity for impact damage (sudden velocity changes)
                targ.oldvelocity = targ.velocity;
 
-               if(this.pushltime < time)  // prevent "snorring" sound when a player hits the jumppad more than once
+               // 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(this.pushltime < time && !(IS_DEAD(targ) && targ.velocity == '0 0 0'))
                {
                        // flash when activated
                        Send_Effect(EFFECT_JUMPPAD, targ.origin, targ.velocity, 1);