Code for my last commit
[voretournament/voretournament.git] / data / qcsrc / server / w_grabber.qc
index dbf470f..50b6add 100644 (file)
@@ -47,6 +47,11 @@ void W_Grabber_Attack2()
        {\r
                Damage(trace_ent, self, self, cvar("g_balance_grabber_secondary_damage"), WEP_GRABBER | HITTYPE_SECONDARY, trace_endpos, cvar("g_balance_grabber_secondary_force") * w_shotdir);\r
                pointparticles(particleeffectnum("grabber_impact2"), trace_endpos, '0 0 0', 1);\r
+               if(trace_ent.classname == "player")\r
+                       sound (self, CHAN_PROJECTILE, "weapons/grabber_impact2_player.wav", VOL_BASE, ATTN_NORM);\r
+               else\r
+                       sound (self, CHAN_PROJECTILE, "weapons/grabber_impact2_world.wav", VOL_BASE, ATTN_NORM);\r
+\r
                W_Grabber_UpdateStats(self, FALSE, TRUE); // the shot is recorded above\r
        }\r
 \r
@@ -200,7 +205,10 @@ float w_grabber(float req)
                precache_model ("models/weapons/g_grabber.md3");\r
                precache_model ("models/weapons/v_grabber.md3");\r
                precache_model ("models/weapons/h_grabber.iqm");\r
-               precache_sound ("weapons/grabber_impact.wav"); // done by g_grabber.qc\r
+               precache_sound ("weapons/grabber_impact_player.wav");\r
+               precache_sound ("weapons/grabber_impact_world.wav");\r
+               precache_sound ("weapons/grabber_impact2_player.wav");\r
+               precache_sound ("weapons/grabber_impact2_world.wav");\r
                precache_sound ("weapons/grabber_fire.wav");\r
                precache_sound ("weapons/grabber_altfire.wav");\r
                precache_sound ("weapons/grabber_swing.wav");\r