From: terencehill Date: Sun, 6 Mar 2022 16:01:29 +0000 (+0100) Subject: Fix powerup sound not stopped on death if powerup was given with the give command X-Git-Tag: xonotic-v0.8.5~174 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=98e6ea9eb4ba5fb28ec9b3bf8ee54cf2bb6560d7;p=xonotic%2Fxonotic-data.pk3dir.git Fix powerup sound not stopped on death if powerup was given with the give command --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index 57b245a25..ed39c7bca 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -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); } }