]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Code for my last commit
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 14:37:33 +0000 (17:37 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Jul 2011 14:37:33 +0000 (17:37 +0300)
data/qcsrc/server/g_grabber.qc
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/w_grabber.qc

index f8ce6c0545c468fc2fd152f1e01217620701a494..264ce29e40a9a5742785dc417f7eacc2cb30b09e 100644 (file)
@@ -102,10 +102,13 @@ void GrabberThink();
 void Grabber_Stop()\r
 {\r
        pointparticles(particleeffectnum("grabber_impact"), self.origin, '0 0 0', 1);\r
-       sound (self, CHAN_PROJECTILE, "weapons/grabber_impact.wav", VOL_BASE, ATTN_NORM);\r
+       if(other.classname == "player")\r
+               sound (self, CHAN_PROJECTILE, "weapons/grabber_impact_player.wav", VOL_BASE, ATTN_NORM);\r
+       else\r
+               sound (self, CHAN_PROJECTILE, "weapons/grabber_impact_world.wav", VOL_BASE, ATTN_NORM);\r
 \r
        self.state = 1;\r
-       self.think =GrabberThink;\r
+       self.think = GrabberThink;\r
        self.nextthink = time;\r
        self.touch = SUB_Null;\r
        self.velocity = '0 0 0';\r
index 0ccaa0ffb61b13c5ab3b23d6060c01623dae77ed..3a97b623c4b38e41b6060eb62fbeb7c386c33eca 100644 (file)
@@ -1442,9 +1442,6 @@ void precache()
     // common weapon precaches\r
     precache_sound ("weapons/weapon_switch.wav");\r
     precache_sound ("weapons/weaponpickup.wav");\r
-    precache_sound ("weapons/grabber_fire.wav"); // grabber\r
-       precache_sound ("weapons/grabber_altfire.wav"); // grabber\r
-    precache_sound ("weapons/grabber_impact.wav"); // grabber\r
 \r
        float i;\r
        for(i = 0; i < 8; i += 1)\r
index dbf470f3d44b61c50f2b1ddc4a12d170389c1042..50b6addb6fe8ddb1a97b2ab1eeabfd58812cea9e 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