]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Move Grabber recoil in the proper function, instead of defining it separately and...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 Nov 2011 10:58:47 +0000 (12:58 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 Nov 2011 10:58:47 +0000 (12:58 +0200)
data/qcsrc/server/cl_weaponsystem.qc
data/qcsrc/server/w_grabber.qc

index f2c779d3eeb1bdfd28e661aef45c93258d66425b..d55032b1f515d7cf0ea313a6861fc6087aabe5af 100644 (file)
@@ -223,7 +223,7 @@ void W_SetupShot_Dir_ProjectileSize(entity ent, vector s_forward, vector mi, vec
        ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)\r
 \r
        if (!g_norecoil)\r
-               ent.punchangle_x += recoil * -1;\r
+               ent.punchangle_x -= recoil;\r
 \r
        if (snd != "")\r
        {\r
index 023b9e0533013872fd35068e731e0ae1d4964077..005837c2d697551320dc0e445dc7bcd4a46a3835 100644 (file)
@@ -36,7 +36,7 @@ void W_Grabber_Attack2()
        if(time < self.weapon_delay)\r
                return;\r
 \r
-       W_SetupShot (self, TRUE, 0, "weapons/grabber_altfire.wav", cvar("g_balance_grabber_secondary_damage"));\r
+       W_SetupShot (self, TRUE, cvar("g_balance_grabber_secondary_recoil"), "weapons/grabber_altfire.wav", cvar("g_balance_grabber_secondary_damage"));\r
        pointparticles(particleeffectnum("grabber_muzzleflash"), w_shotorg, '0 0 0', 1);\r
        W_Grabber_UpdateStats(self, TRUE, FALSE); // the hit is recorded below\r
 \r
@@ -60,9 +60,6 @@ void W_Grabber_Attack2()
                W_Grabber_UpdateStats(self, FALSE, TRUE); // the shot is recorded above\r
        }\r
 \r
-       if (!g_norecoil)\r
-               self.punchangle_x -= cvar("g_balance_grabber_secondary_recoil");\r
-\r
        W_DecreaseAmmo(ammo_fuel, cvar("g_balance_grabber_secondary_ammo"), cvar("g_balance_grabber_reload_ammo"));\r
 }\r
 \r
@@ -114,8 +111,7 @@ float w_grabber(float req)
                                if (time > self.grabber_refire)\r
                                if (weapon_prepareattack(0, -1))\r
                                {\r
-                                       if (!g_norecoil)\r
-                                               self.punchangle_x -= cvar("g_balance_grabber_primary_recoil");\r
+                                       W_SetupShot (self, TRUE, cvar("g_balance_grabber_primary_recoil"), "", 0); // do this for recoil\r
                                        W_DecreaseAmmo(ammo_fuel, cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_reload_ammo"));\r
                                        self.grabber_state |= GRABBER_FIRING;\r
                                        weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready);                               \r