]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix powerup sound not stopped on death if powerup was given with the give command
authorterencehill <piuntn@gmail.com>
Sun, 6 Mar 2022 16:01:29 +0000 (17:01 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 6 Mar 2022 16:01:29 +0000 (17:01 +0100)
qcsrc/server/items/items.qc

index 57b245a252a167b2beb7b069f1b2f12bac1ccbfd..ed39c7bca91e11fcb3d11d32f590c737379e0355 100644 (file)
@@ -1435,12 +1435,12 @@ void GiveSound(entity e, float v0, float v1, float t, Sound snd_incr, Sound snd_
        if(v1 <= v0 - t)
        {
                if(snd_decr != NULL)
-                       sound (e, CH_TRIGGER, snd_decr, VOL_BASE, ATTEN_NORM);
+                       sound(e, CH_TRIGGER, snd_decr, VOL_BASE, ATTEN_NORM);
        }
        else if(v0 >= v0 + t)
        {
                if(snd_incr != NULL)
-                       sound (e, CH_TRIGGER, snd_incr, VOL_BASE, ATTEN_NORM);
+                       sound(e, ((snd_incr == SND_POWERUP) ? CH_TRIGGER_SINGLE : CH_TRIGGER), snd_incr, VOL_BASE, ATTEN_NORM);
        }
 }