From: MirceaKitsune Date: Thu, 17 Nov 2011 10:58:47 +0000 (+0200) Subject: Move Grabber recoil in the proper function, instead of defining it separately and... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f1a7e6e3dad3eaece91ce2beb897c0f88b6be00a;p=voretournament%2Fvoretournament.git Move Grabber recoil in the proper function, instead of defining it separately and not using it where we should --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index f2c779d3..d55032b1 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -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) if (!g_norecoil) - ent.punchangle_x += recoil * -1; + ent.punchangle_x -= recoil; if (snd != "") { diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index 023b9e05..005837c2 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -36,7 +36,7 @@ void W_Grabber_Attack2() if(time < self.weapon_delay) return; - W_SetupShot (self, TRUE, 0, "weapons/grabber_altfire.wav", cvar("g_balance_grabber_secondary_damage")); + W_SetupShot (self, TRUE, cvar("g_balance_grabber_secondary_recoil"), "weapons/grabber_altfire.wav", cvar("g_balance_grabber_secondary_damage")); pointparticles(particleeffectnum("grabber_muzzleflash"), w_shotorg, '0 0 0', 1); W_Grabber_UpdateStats(self, TRUE, FALSE); // the hit is recorded below @@ -60,9 +60,6 @@ void W_Grabber_Attack2() W_Grabber_UpdateStats(self, FALSE, TRUE); // the shot is recorded above } - if (!g_norecoil) - self.punchangle_x -= cvar("g_balance_grabber_secondary_recoil"); - W_DecreaseAmmo(ammo_fuel, cvar("g_balance_grabber_secondary_ammo"), cvar("g_balance_grabber_reload_ammo")); } @@ -114,8 +111,7 @@ float w_grabber(float req) if (time > self.grabber_refire) if (weapon_prepareattack(0, -1)) { - if (!g_norecoil) - self.punchangle_x -= cvar("g_balance_grabber_primary_recoil"); + W_SetupShot (self, TRUE, cvar("g_balance_grabber_primary_recoil"), "", 0); // do this for recoil W_DecreaseAmmo(ammo_fuel, cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_reload_ammo")); self.grabber_state |= GRABBER_FIRING; weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready);