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
WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_grabber_secondary_radius"), FALSE, self, ANTILAG_LATENCY(self));\r
{\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
+\r
if(trace_ent.classname == "player")\r
+ {\r
+ trace_ent.armorvalue = bound(0, trace_ent.armorvalue - cvar("g_balance_grabber_secondary_armordamage"), cvar("g_balance_armor_limit"));\r
+ trace_ent.grabber_stunned = time + cvar("g_balance_grabber_secondary_stun_maxtime") * random();\r
sound (self, CHAN_PROJECTILE, "weapons/grabber_impact2_player.wav", VOL_BASE, ATTN_NORM);\r
+ }\r
else\r
+ {\r
sound (self, CHAN_PROJECTILE, "weapons/grabber_impact2_world.wav", VOL_BASE, ATTN_NORM);\r
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
+ pointparticles(particleeffectnum("ground_metal"), trace_endpos, '0 0 0', 1);\r
+ else\r
+ pointparticles(particleeffectnum("ground_dirt"), trace_endpos, '0 0 0', 1);\r
+ }\r
\r
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
// determine by distance if this will be primary fire or alternate fire\r
W_SetupShot (self, TRUE, 0, "", 0); // do this to update w_shotorg\r
WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_grabber_secondary_radius"), FALSE, self, ANTILAG_LATENCY(self));\r
- if(trace_fraction < 1)\r
- dprint("!!!!!!!!!!!!!!!!!!!!!!!\n");\r
+ if(cvar("g_balance_grabber_secondary") && trace_fraction < 1 && !self.grabber) // not if hooked or firing the hook\r
+ self.stat_crosshair_style = 1;\r
else\r
- dprint("#######################\n");\r
+ self.stat_crosshair_style = 0;\r
\r
grabbered_fuel = cvar("g_balance_grabber_primary_grabbered_fuel");\r
// forced reload\r
if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo"))\r
- && self.clip_load >= 0 && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK)) // not while hooked and still have ammo to stay hooked\r
+ && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && (self.grabber || self.grabber_state & GRABBER_FIRING))) // not while hooked and still have ammo to stay hooked\r
{\r
if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
weapon_action(self.weapon, WR_RELOAD);\r
}\r
else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten\r
{\r
- if(trace_fraction >= 1 && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
+ if(!self.stat_crosshair_style && self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
{\r
if(time < self.weapon_delay)\r
return FALSE;\r
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
}\r
}\r
- else if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
+ else if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
{\r
if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
{\r
self.grabber_state |= GRABBER_PULLING;\r
self.grabber_state &~= GRABBER_RELEASING;\r
\r
- if (self.BUTTON_ATCK)\r
+ if (self.BUTTON_ATCK2)\r
{\r
// already fired\r
if(self.grabber)\r
}\r
else if (req == WR_RELOAD)\r
{\r
- self.grabber_state |= GRABBER_REMOVING;\r
+ if(self.clip_load >= 0) // prevents a bug\r
+ self.grabber_state |= GRABBER_REMOVING;\r
W_Reload(min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo")), cvar("g_balance_grabber_reload_ammo"), cvar("g_balance_grabber_reload_time"), "weapons/reload.wav");\r
}\r
else if (req == WR_SUICIDEMESSAGE)\r