From: MirceaKitsune Date: Sun, 26 Sep 2010 10:40:11 +0000 (+0300) Subject: Turret hit and explode sounds X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=824eddb70836fe93ee931260c2d021833bca3557;p=voretournament%2Fvoretournament.git Turret hit and explode sounds --- diff --git a/data/qcsrc/server/tturrets/system/system_damage.qc b/data/qcsrc/server/tturrets/system/system_damage.qc index c95ece42..cb7c2656 100644 --- a/data/qcsrc/server/tturrets/system/system_damage.qc +++ b/data/qcsrc/server/tturrets/system/system_damage.qc @@ -182,6 +182,8 @@ void turret_stdproc_die() // Go boom //RadiusDamage (self,self, min(self.ammo,50),min(self.ammo,50) * 0.25,250,world,min(self.ammo,50)*5,DEATH_TURRET,world); + sound(self, CHAN_TRIGGER, "turrets/turret_exp.wav", VOL_BASE, ATTN_NORM); + if(self.damage_flags & TFL_DMG_DEATH_NORESPAWN) { if (self.turret_diehook) @@ -297,6 +299,12 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo self.health = self.health - damage; + //sound on every hit + if (random() < 0.5) + sound(self, CHAN_TRIGGER, "turrets/turret_hit1.wav", VOL_BASE, ATTN_NORM); + else + sound(self, CHAN_TRIGGER, "turrets/turret_hit2.wav", VOL_BASE, ATTN_NORM); + // thorw head slightly off aim when hit? if (self.damage_flags & TFL_DMG_HEADSHAKE) { diff --git a/data/qcsrc/server/tturrets/system/system_misc.qc b/data/qcsrc/server/tturrets/system/system_misc.qc index 9b4e1cce..7a1ad98d 100644 --- a/data/qcsrc/server/tturrets/system/system_misc.qc +++ b/data/qcsrc/server/tturrets/system/system_misc.qc @@ -395,4 +395,8 @@ void turrets_precash() //precache_model ("models/turrets/tesla_head.md3"); //precache_model ("models/turrets/tesla_base.md3"); //turrets_precache_debug_models(); + + precache_sound("turrets/turret_hit1.wav"); + precache_sound("turrets/turret_hit2.wav"); + precache_sound("turrets/turret_exp.wav"); } diff --git a/data/sound/turrets/turret_exp.ogg b/data/sound/turrets/turret_exp.ogg new file mode 100644 index 00000000..1d600459 Binary files /dev/null and b/data/sound/turrets/turret_exp.ogg differ diff --git a/data/sound/turrets/turret_hit1.ogg b/data/sound/turrets/turret_hit1.ogg new file mode 100644 index 00000000..c92ce59e Binary files /dev/null and b/data/sound/turrets/turret_hit1.ogg differ diff --git a/data/sound/turrets/turret_hit2.ogg b/data/sound/turrets/turret_hit2.ogg new file mode 100644 index 00000000..b74f9e43 Binary files /dev/null and b/data/sound/turrets/turret_hit2.ogg differ