From: Mario Date: Tue, 29 Mar 2016 17:22:31 +0000 (+1000) Subject: When picking up a powerup, don't keep playing the old pickup sound (hopefully fixes... X-Git-Tag: xonotic-v0.8.2~989 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4742a74e0f5a43266324589eaebdee352dab739c;p=xonotic%2Fxonotic-data.pk3dir.git When picking up a powerup, don't keep playing the old pickup sound (hopefully fixes intense spam when picking up a load of random powerups quickly) --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 87623da36..85ba9f51b 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -816,7 +816,7 @@ LABEL(pickup) other.last_pickup = time; Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1); - _sound (other, CH_TRIGGER, (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM); + _sound (other, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM); if (this.classname == "droppedweapon") remove (this);