From f60005888c700de46fe903cd3d25839497e46502 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 19 May 2023 23:58:35 +0200 Subject: [PATCH] Fix Extralife pickup sound stopping long powerup sounds --- qcsrc/server/items/items.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- 2.39.2