Recoil for the grabber
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 21:25:42 +0000 (23:25 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 21:25:42 +0000 (23:25 +0200)
data/balance.cfg
data/qcsrc/server/w_grabber.qc

index b028fc5..2bb8232 100644 (file)
@@ -172,12 +172,14 @@ set g_balance_grabber_primary_animtime 0.3 // good shoot anim
 set g_balance_grabber_primary_grabbered_time_max 0 // infinite\r
 set g_balance_grabber_primary_grabbered_time_free 2 // 2s being grabbered are free\r
 set g_balance_grabber_primary_grabbered_fuel 4 // fuel per second grabbered\r
+set g_balance_grabber_primary_recoil 2;\r
 set g_balance_grabber_secondary_ammo 10\r
 set g_balance_grabber_secondary_refire 0.5\r
 set g_balance_grabber_secondary_animtime 0.3 // good shoot anim\r
 set g_balance_grabber_secondary_damage 45\r
 set g_balance_grabber_secondary_force 175\r
 set g_balance_grabber_secondary_radius 75\r
+set g_balance_grabber_secondary_recoil 4;\r
 set g_balance_grabber_reload_ammo 35\r
 set g_balance_grabber_reload_time 2\r
 // }}}\r
index 047f006..92a1223 100644 (file)
@@ -49,6 +49,9 @@ 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
@@ -95,6 +98,8 @@ 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_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