When stomach kicking with a weapon, do more damage! Makes sense and should be even...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 17 Apr 2011 00:09:09 +0000 (03:09 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 17 Apr 2011 00:09:09 +0000 (03:09 +0300)
data/balanceVT.cfg
data/qcsrc/server/vore.qc

index 75f6533..0aa5858 100644 (file)
@@ -180,6 +180,10 @@ set g_balance_grabber_secondary_damage 45
 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_melee_damage 10 // only used to boost stomach kicks\r
+set g_balance_grabber_melee_force 15 // only used to boost stomach kicks\r
+set g_balance_grabber_melee_refire 0.25 // only used to boost stomach kicks\r
+set g_balance_grabber_melee_recoil 2 // only used to boost stomach kicks\r
 set g_balance_grabber_reload_ammo 35\r
 set g_balance_grabber_reload_time 2\r
 // }}}\r
index b630d6d..83694d8 100644 (file)
@@ -392,21 +392,35 @@ void Vore_StomachKick()
 \r
        if(time > self.stomachkick_delay)\r
        {\r
-               float damage;\r
+               float damage, force, rekick;\r
+               entity e;\r
+\r
                damage = ceil(random() * (cvar("g_balance_vore_kick_damage_max") - cvar("g_balance_vore_kick_damage_min")) + cvar("g_balance_vore_kick_damage_min"));\r
-               Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, v_forward * cvar("g_balance_vore_kick_force"));\r
-               sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.wav", VOL_BASE, ATTN_NORM);\r
-               self.predator.punchangle_x -= self.predator.cvar_cl_vore_kick_punchangle;\r
+               force = cvar("g_balance_vore_kick_force");\r
+               rekick = time + cvar("g_balance_vore_kick_delay");\r
 \r
-               // if we still have a weapon, play the melee animation and sound\r
-               weapon_thinkf(WFRAME_FIRE2, time + cvar("g_balance_vore_kick_delay"), w_ready); // only intended to animate the gun, does not do any damage\r
+               // if we still have a weapon, we use that to kick for more damage\r
+               // stomach kicking with a weapon does nothing more than boosting existing damage\r
                if(self.weapon)\r
+               {\r
+                       e = get_weaponinfo(self.weapon);\r
+                       damage += cvar(strcat("g_balance_", e.netname, "_melee_damage"));\r
+                       force += cvar(strcat("g_balance_", e.netname, "_melee_force"));\r
+                       rekick += cvar(strcat("g_balance_", e.netname, "_melee_refire"));\r
+                       if (!g_norecoil)\r
+                               self.punchangle_x -= cvar(strcat("g_balance_", e.netname, "_melee_recoil"));\r
                        sound (self, CHAN_WEAPON, "weapons/grabber_melee.wav", VOL_BASE, ATTN_NORM);\r
+                       weapon_thinkf(WFRAME_FIRE2, rekick, w_ready); // only intended to animate the gun, as damage is calculated above\r
+               }\r
+\r
+               Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, v_forward * force);\r
+               sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.wav", VOL_BASE, ATTN_NORM);\r
+               self.predator.punchangle_x -= self.predator.cvar_cl_vore_kick_punchangle;\r
 \r
                if(random() < cvar("g_balance_vore_kick_escapeprobability"))\r
                        Vore_Regurgitate(self);\r
 \r
-               self.stomachkick_delay = time + cvar("g_balance_vore_kick_delay");\r
+               self.stomachkick_delay = rekick;\r
        }\r
 }\r
 \r