Client_setmodel(setmodel_state());\r
if not(self.predator.classname == "player" || self.fakeprey)\r
self.alpha = default_player_alpha;\r
+ else\r
+ self.alpha = -1; // hide all prey\r
return TRUE;\r
}\r
\r
RemoveGrabber(self); // Wazat's Grabber\r
\r
Vore_DeadPrey_Detach(self);\r
+ self.fakeprey = 0; // completely clear the fakeprey status\r
\r
self.classname = "player";\r
self.wasplayer = TRUE;\r
if(self.crouch)\r
{\r
//setsize (self, PL_CROUCH_MIN * self.scale, PL_CROUCH_MAX * self.scale);\r
- if not(self.predator.classname == "player" || self.fakeprey)\r
+ if not(self.predator.classname == "player" || self.fakeprey > 1)\r
self.view_ofs = PL_CROUCH_VIEW_OFS * self.scale;\r
}\r
else\r
{\r
//setsize (self, PL_MIN * self.scale, PL_MAX * self.scale);\r
- if not(self.predator.classname == "player" || self.fakeprey)\r
+ if not(self.predator.classname == "player" || self.fakeprey > 1)\r
self.view_ofs = PL_VIEW_OFS * self.scale;\r
}\r
}\r
// TODO maybe convert this to a TE?\r
void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker)\r
{\r
- if(gibowner.predator.classname == "player")\r
+ if(gibowner.predator.classname == "player" || gibowner.fakeprey > 1)\r
return; // you can't bleed or gib outside of the stomach\r
\r
entity e;\r
}\r
void Vore_CameraEffect_Apply()\r
{\r
- if not(self.predator.classname == "player" || self.fakeprey)\r
+ if not(self.predator.classname == "player" || self.fakeprey > 1)\r
return;\r
\r
if(self.cvar_cl_vore_cameraspeed)\r
self.view_ofs_z = PL_PREY_VIEW_OFS_z / self.cameraeffect_current;\r
\r
float prey_height;\r
- if(self.fakeprey)\r
+ if(self.fakeprey > 1)\r
prey_height = (self.scale - self.fakepredator.scale) * cvar("g_healthsize_vore_pos");\r
else\r
prey_height = (self.scale - self.predator.scale) * cvar("g_healthsize_vore_pos");\r
e.velocity = '0 0 0';\r
e.movetype = MOVETYPE_FOLLOW;\r
e.solid = SOLID_NOT;\r
- e.alpha = -1; // best way of hiding the eaten player\r
e.aiment = e.predator; // follow the predator, automatically unset when regurgitated\r
\r
// drop keys (KH) and flags (CTF) when we get swallowed\r
if(e.health > 0) // leave SOLID_NOT for dead bodies\r
e.solid = e.vore_oldsolid;\r
e.view_ofs_z = PL_VIEW_OFS_z;\r
- e.alpha = default_player_alpha;\r
\r
// apply velocities\r
local vector oldforward, oldright, oldup;\r
\r
// this entity is like e.predator but for dead prey, to avoid conflicts\r
e.fakepredator = e.predator;\r
- e.fakeprey = TRUE;\r
+ e.fakeprey = 2; // is fakeprey in a stomach\r
\r
// first release the prey from the predator, as dead prey needs to be attached differently\r
// the predator's stomach load is also decreased, as dead prey doesn't count any more\r
e.takedamage = DAMAGE_NO;\r
e.solid = SOLID_NOT;\r
e.aiment = e.fakepredator;\r
-\r
- // completely remove the dead body\r
- e.modelindex = 0;\r
}\r
\r
void Vore_DeadPrey_Detach(entity e)\r
return;\r
\r
e.fakepredator = world;\r
- e.fakeprey = FALSE;\r
+ e.fakeprey = 1; // was fakeprey but is now detached\r
e.aiment = world;\r
e.movetype = MOVETYPE_TOSS;\r
}\r
{\r
if(pred_disconnect)\r
{\r
- if(e.fakeprey)\r
+ if(e.fakeprey > 1)\r
Vore_DeadPrey_Detach(e);\r
else\r
Vore_Regurgitate(e);\r
}\r
\r
// set all vore stats\r
- if(self.fakeprey)\r
+ if(self.fakeprey > 1)\r
self.stat_eaten = num_for_edict(self.fakepredator);\r
else if(self.predator.classname == "player")\r
{\r