if(self.aiment)\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
+ {\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(self.aiment.predator != self.owner)\r
+ SetMovetypeFollow(self, self.aiment.predator);\r
+ else\r
+ RemoveGrabber(self.owner);\r
+ }\r
+\r
self.nextthink = time;\r
\r
makevectors(self.owner.v_angle);\r
if(other.movetype != MOVETYPE_NONE)\r
{\r
SetMovetypeFollow(self, other);\r
+ W_Grabber_UpdateStats(self.owner, FALSE, TRUE); // count this as a hit\r
WarpZone_RefSys_BeginAddingIncrementally(self, self.aiment);\r
}\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
// voidGrabberFrame()\r
// {\r
// // this function has been modified for Voretournament\r
-// - if (self.BUTTON_GRABBER && g_grabber)\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
// if (self.grabber)\r
// RemoveGrabber(self);\r
// }\r
-// - self.button6_pressed_before = self.BUTTON_GRABBER;\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
if(timeoutStatus != 2 && self.weapon != WEP_GRABBER)\r
{\r
// offhand grabber controls\r
- if(self.BUTTON_GRABBER)\r
+ if(self.BUTTON_JETPACK)\r
{\r
if not(self.grabber || (self.grabber_state & GRABBER_WAITING_FOR_RELEASE))\r
{\r
}\r
else if(!(self.items & IT_JETPACK) && self.switchweapon != WEP_GRABBER)\r
{\r
- if(self.BUTTON_GRABBER && !self.grabber_switchweapon)\r
+ if(self.BUTTON_JETPACK && !self.grabber_switchweapon)\r
W_SwitchWeapon(WEP_GRABBER);\r
}\r
- self.grabber_switchweapon = self.BUTTON_GRABBER;\r
+ self.grabber_switchweapon = self.BUTTON_JETPACK;\r
\r
if(self.weapon != WEP_GRABBER)\r
{\r