]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Turret hit and explode sounds
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 10:40:11 +0000 (13:40 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 10:40:11 +0000 (13:40 +0300)
data/qcsrc/server/tturrets/system/system_damage.qc
data/qcsrc/server/tturrets/system/system_misc.qc
data/sound/turrets/turret_exp.ogg [new file with mode: 0644]
data/sound/turrets/turret_hit1.ogg [new file with mode: 0644]
data/sound/turrets/turret_hit2.ogg [new file with mode: 0644]

index c95ece424e0f3b783a89e48cc8b52a455faf7962..cb7c26569783213dff8fee7f7cd72a9217d37ff2 100644 (file)
@@ -182,6 +182,8 @@ void turret_stdproc_die()
 // Go boom\r
     //RadiusDamage (self,self, min(self.ammo,50),min(self.ammo,50) * 0.25,250,world,min(self.ammo,50)*5,DEATH_TURRET,world);\r
 \r
+       sound(self, CHAN_TRIGGER, "turrets/turret_exp.wav", VOL_BASE, ATTN_NORM);\r
+\r
     if(self.damage_flags & TFL_DMG_DEATH_NORESPAWN)\r
     {\r
         if (self.turret_diehook)\r
@@ -297,6 +299,12 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
 \r
     self.health = self.health - damage;\r
 \r
+       //sound on every hit\r
+       if (random() < 0.5)\r
+               sound(self, CHAN_TRIGGER, "turrets/turret_hit1.wav", VOL_BASE, ATTN_NORM);\r
+       else\r
+               sound(self, CHAN_TRIGGER, "turrets/turret_hit2.wav", VOL_BASE, ATTN_NORM);\r
+\r
     // thorw head slightly off aim when hit?\r
     if (self.damage_flags & TFL_DMG_HEADSHAKE)\r
     {\r
index 9b4e1cce15e1233f32d8b0582f266f8ce82267c0..7a1ad98d67381fe19b9ea7eddb6ca361d5263d4b 100644 (file)
@@ -395,4 +395,8 @@ void turrets_precash()
     //precache_model ("models/turrets/tesla_head.md3");\r
     //precache_model ("models/turrets/tesla_base.md3");\r
        //turrets_precache_debug_models();\r
+\r
+       precache_sound("turrets/turret_hit1.wav");\r
+       precache_sound("turrets/turret_hit2.wav");\r
+       precache_sound("turrets/turret_exp.wav");\r
 }\r
diff --git a/data/sound/turrets/turret_exp.ogg b/data/sound/turrets/turret_exp.ogg
new file mode 100644 (file)
index 0000000..1d60045
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 (file)
index 0000000..c92ce59
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 (file)
index 0000000..b74f9e4
Binary files /dev/null and b/data/sound/turrets/turret_hit2.ogg differ