}\r
\r
.float grabber_length;\r
-.float grabber_switchweapon;\r
\r
void RemoveGrabber(entity pl)\r
{\r
WarpZone_RefSys_AddIncrementally(self, self.aiment);\r
\r
// prevent the grabber from sticking to a player that has been swallowed\r
- if(self.aiment.predator.classname == "player")\r
+ if(self.aiment.stat_eaten)\r
{\r
// if the grabber is linked to a player that we swallowed, disconnect it (or the grabber will stick to us / the player inside us)\r
// otherwise, link the grabber to the player who ate our linked player\r
if(other)\r
if(other.movetype != MOVETYPE_NONE)\r
{\r
+ if(other.classname == "player")\r
+ {\r
+ if(other.BUTTON_CHAT)\r
+ self.owner.typehitsound += 1;\r
+ else\r
+ self.owner.hitsound += 1; // play this for team mates too, as we could be grabbing them to heal them\r
+ W_Grabber_UpdateStats(self.owner, FALSE, TRUE); // count this as a hit\r
+ }\r
+\r
SetMovetypeFollow(self, other);\r
WarpZone_RefSys_BeginAddingIncrementally(self, self.aiment);\r
}\r
local entity missile;\r
local vector org;\r
\r
+ W_Grabber_UpdateStats(self, TRUE, FALSE);\r
+\r
if((arena_roundbased && time < warmup) || (time < game_starttime))\r
return;\r
\r
missile.damageforcescale = 0;\r
}\r
\r
-// voidGrabberFrame()\r
-// {\r
-// // this function has been modified for Voretournament\r
-// - if (self.BUTTON_JETPACK && g_grabber)\r
-// {\r
-// - if (!self.grabber && self.grabber_time <= time && !self.button6_pressed_before)\r
-// - if (timeoutStatus != 2) //only allow the player to fire the grabber if the game is not paused (timeout)\r
-// - FireGrabber();\r
-// }\r
-// - else\r
-// {\r
-// if (self.grabber)\r
-// RemoveGrabber(self);\r
-// }\r
-// - self.button6_pressed_before = self.BUTTON_JETPACK;\r
-// /*\r
-// // if I have no grabber or it's not pulling yet, make sure I'm not flying!\r
-// if((self.grabber == world || !self.grabber.state) && self.movetype == MOVETYPE_FLY)\r
-\r
void GrabberFrame()\r
{\r
if(timeoutStatus != 2 && self.weapon != WEP_GRABBER)\r
{\r
- // offhand grabber controls\r
- if(self.BUTTON_JETPACK)\r
- {\r
- if not(self.grabber || (self.grabber_state & GRABBER_WAITING_FOR_RELEASE))\r
- {\r
- self.grabber_state |= GRABBER_FIRING;\r
- self.grabber_state |= GRABBER_WAITING_FOR_RELEASE;\r
- }\r
- }\r
- else\r
- {\r
- self.grabber_state |= GRABBER_REMOVING;\r
- self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
- }\r
+ self.grabber_state |= GRABBER_REMOVING;\r
+ self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
\r
self.grabber_state &~= GRABBER_RELEASING;\r
if(self.BUTTON_CROUCH)\r
//self.grabber_state &~= GRABBER_RELEASING;\r
}\r
}\r
- else if(!(self.items & IT_JETPACK) && self.switchweapon != WEP_GRABBER)\r
- {\r
- if(self.BUTTON_JETPACK && !self.grabber_switchweapon)\r
- W_SwitchWeapon(WEP_GRABBER);\r
- }\r
- self.grabber_switchweapon = self.BUTTON_JETPACK;\r
\r
if(self.weapon != WEP_GRABBER)\r
{\r