From: MirceaKitsune Date: Fri, 22 Jul 2011 12:39:09 +0000 (+0300) Subject: Fix a bug causing the strength fire sound to be spammed each frame (and jam the serve... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5210ac5521e1112b309e9a74559a843209bb1a2a;p=voretournament%2Fvoretournament.git Fix a bug causing the strength fire sound to be spammed each frame (and jam the server), due to us setting up the projectile dir every time to get the firing type. We only play that sound now if our shot does some damage. --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index c1e9ec53..bc2cb52f 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -230,8 +230,8 @@ void W_SetupShot_Dir_ProjectileSize(entity ent, vector s_forward, vector mi, vec sound (ent, CHAN_WEAPON, snd, VOL_BASE, ATTN_NORM); } - if (ent.items & IT_STRENGTH) - sound (ent, CHAN_AUTO, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM); + if (ent.items & IT_STRENGTH && maxdamage) + sound (ent, CHAN_AUTO, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM); }; #define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, maxdamage)