From: terencehill Date: Fri, 19 May 2023 21:58:35 +0000 (+0200) Subject: Fix Extralife pickup sound stopping long powerup sounds X-Git-Tag: xonotic-v0.8.6~96^2~1 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=f60005888c700de46fe903cd3d25839497e46502;p=xonotic%2Fxonotic-data.pk3dir.git Fix Extralife pickup sound stopping long powerup sounds --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index c36f84376..57720ef9a 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -702,7 +702,10 @@ LABEL(pickup) STAT(LAST_PICKUP, toucher) = time; Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1); - _sound (toucher, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM); + GameItem def = this.itemdef; + int ch = ((def.instanceOfPowerup && def.m_itemid != IT_RESOURCE) ? CH_TRIGGER_SINGLE : CH_TRIGGER); + string snd = (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)); + _sound(toucher, ch, snd, VOL_BASE, ATTEN_NORM); MUTATOR_CALLHOOK(ItemTouched, this, toucher); if (wasfreed(this))