From: Mario Date: Wed, 4 Nov 2015 00:12:30 +0000 (+1000) Subject: Use SND_RIC_RANDOM X-Git-Tag: xonotic-v0.8.2~1733 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6934dfd60d93f449ce426b2ff52daa6cc03cef52;p=xonotic%2Fxonotic-data.pk3dir.git Use SND_RIC_RANDOM --- diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 803b241d0..35d36d1f0 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -320,7 +320,7 @@ void Ent_DamageInfo(float isNew) break; case DEATH_TURRET_WALK_MELEE: - sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTEN_MIN); + sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_MIN); pointparticles(EFFECT_TE_SPARK, self.origin, w_backoff * 1000, 1); break; diff --git a/qcsrc/common/weapons/weapon/hmg.qc b/qcsrc/common/weapons/weapon/hmg.qc index a46f19eb0..d701870ec 100644 --- a/qcsrc/common/weapons/weapon/hmg.qc +++ b/qcsrc/common/weapons/weapon/hmg.qc @@ -163,12 +163,7 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weapone org2 = w_org + w_backoff * 2; pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1); if(!w_issilent) - if(w_random < 0.05) - sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTEN_NORM); - else if(w_random < 0.1) - sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTEN_NORM); - else if(w_random < 0.2) - sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTEN_NORM); + sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM); } #endif diff --git a/qcsrc/common/weapons/weapon/machinegun.qc b/qcsrc/common/weapons/weapon/machinegun.qc index 71f7ac3a8..b8f485493 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@ -369,12 +369,7 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, .entity weaponentit org2 = w_org + w_backoff * 2; pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1); if(!w_issilent) - if(w_random < 0.05) - sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTN_NORM); - else if(w_random < 0.1) - sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTN_NORM); - else if(w_random < 0.2) - sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTN_NORM); } #endif diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index 5aed6a7d4..be7e34abf 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -258,12 +258,7 @@ void W_Rifle_BulletHail(.entity weaponentity, float mode, void(void) AttackFunc, pointparticles(EFFECT_RIFLE_IMPACT, org2, w_backoff * 1000, 1); if(!w_issilent) { - if(w_random < 0.2) - sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTN_NORM); - else if(w_random < 0.4) - sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTN_NORM); - else if(w_random < 0.5) - sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTN_NORM); } } METHOD(Rifle, wr_init, void(entity thiswep)) diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index 2de55865a..7279973dd 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -342,12 +342,7 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity pointparticles(EFFECT_SHOTGUN_IMPACT, org2, w_backoff * 1000, 1); if(!w_issilent && time - self.prevric > 0.25) { - if(w_random < 0.0165) - sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTEN_NORM); - else if(w_random < 0.033) - sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTEN_NORM); - else if(w_random < 0.05) - sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTEN_NORM); + sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM); self.prevric = time; } }