return FALSE;\r
}\r
\r
+float Vore_PreyCanLeave()\r
+{\r
+ if(teams_matter && self.team == self.eater.team)\r
+ return TRUE;\r
+ return FALSE;\r
+}\r
+\r
// make the camera smoothly lower itself when we get swallowed\r
// the target we are going for is from normal view offset to half of the view offset (because half is the best positioning of the view for the stomach model)\r
.float cameraeffect_current, cameraeffect_target;\r
if(stov(cvar_string("g_vore_regurgitatecolor_released")))\r
e.colormod = stov(cvar_string("g_vore_regurgitatecolor_released"));\r
\r
- if(e.eater.team == e.team && teamplay)\r
+ if(e.team == e.eater.team && teamplay)\r
+ {\r
+ centerprint(e, "^3You have been swallowed by a team mate, don't kick!");\r
centerprint(e.eater, "^3You have swallowed a team mate, use caution!");\r
+ }\r
\r
PlayerSound(e.eater, playersound_swallow, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
setanim(e.eater, e.eater.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
e.eater.swallow_delay = time + cvar("g_balance_vore_swallow_delay");\r
Vore_Weight_apply(e.eater);\r
\r
+ // block firing for a small amount of time when getting regurgitated, or we'll be firing the next frame\r
+ e.weapon_delay = time + button_delay;\r
e.system_delay = e.eater.system_delay = time + system_delay_time;\r
e.eater = world;\r
}\r
}\r
}\r
\r
+void Vore_StomachLeave()\r
+{\r
+ // allows players to get out of their predator at will in some circumstances, such as team mates\r
+\r
+ if(Vore_PreyCanLeave())\r
+ Vore_Regurgitate(self);\r
+ else if(time > self.complain_swallow)\r
+ {\r
+ play2(self, "weapons/unavailable.wav");\r
+ sprint(self, strcat("You can't willingly get out of ", self.eater.netname, "\n"));\r
+ self.complain_swallow = time + complain_delay;\r
+ }\r
+}\r
+\r
.float gurglesound_finished, gurglesound_oldstomachload;\r
void Vore_Gurglesound()\r
{\r
\r
if(self.BUTTON_ATCK)\r
Vore_StomachKick();\r
+ else if(self.BUTTON_JUMP)\r
+ Vore_StomachLeave();\r
+\r
+ self.stat_canleave = Vore_PreyCanLeave();\r
\r
Vore_CameraEffect_Apply();\r
}
\ No newline at end of file