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;
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
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
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))
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;
}
}