velocitymultiplier -0.1\r
\r
\r
-// grabber melee\r
-// based off morphed's cl_gentle\r
-// used in qcsrc/server/w_grabber.qc\r
-effect grabber_melee\r
-tex 43 43\r
-count 3\r
-type spark\r
-color 0xffffff 0x0033ff\r
-size 8 16\r
-sizeincrease 34\r
-alpha 128 128 292\r
-gravity 0\r
-airfriction 5\r
-liquidfriction 10\r
-velocityjitter 25 25 25\r
-lightradius 200\r
-lightradiusfade 200\r
-lightcolor 0.4 0.7 0.9\r
-\r
-\r
//torch flame, spawn it as fast as you can 20 times per second or more, supports direction but not required\r
//fast fire\r
// used nowhere in code, meant for maps\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
- pointparticles(particleeffectnum("grabber_melee"), w_shotorg + w_shotdir * cvar("g_balance_grabber_secondary_radius"), '0 0 0', 1);\r
-\r
- if (trace_fraction < 1)\r
+ if(trace_fraction < 1) // should always be true, but just in case\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
else if (req == WR_THINK)\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
+ else\r
+ dprint("#######################\n");\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
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 not(self.clip_load < 0) // we're not currently reloading\r
+ else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten\r
{\r
- if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1))\r
+ if(trace_fraction >= 1 && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
{\r
- if(self.stat_eaten) // we can't use weapons while in the stomach\r
- return FALSE;\r
if(time < self.weapon_delay)\r
return FALSE;\r
\r
weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready); \r
}\r
}\r
- if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2))\r
+ else if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
{\r
- \r
- if(self.stat_eaten) // we can't use weapons while in the stomach\r
- return FALSE;\r
if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
{\r
W_Grabber_Attack2();\r