set g_vore_regurgitatecolor_color_digest "0.3 0.15 0" "the color players will have when regurgitated after having been digested"\r
set g_vore_regurgitatecolor_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach, does not apply to dead bodies"\r
set g_vore_regurgitatecolor_particles 0.75 "players who are dirty from regurgitation generate particles this often, based on the amount of goo they have on them"\r
-set g_vore_keepdeadprey 0.75 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = ernabled, anything between = probability"\r
set g_vore_neighborprey_distance 8 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
set g_vore_neighborprey_scale 1 "When neighborprey is enabled, all prey is resized by this amount"\r
set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress"\r
\r
// don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view\r
if not(chase || other.classname == "observer") // the observer check prevents a bug\r
- if(other.predator == self || other.fakepredator == self)\r
+ if(other.predator == self)\r
{\r
Client_setmodel(stomachmodel);\r
self.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
\r
Client_setmodel(setmodel_state());\r
self.effects &~= EF_NODEPTHTEST;\r
- if not(self.stat_eaten || self.fakeprey)\r
+ if not(self.stat_eaten)\r
self.alpha = default_player_alpha;\r
- else if(cvar("g_vore_neighborprey_distance") && !self.fakeprey && (self.predator == other.predator || self.predator == other.fakepredator) && !(chase || other.classname == "observer"))\r
+ else if(cvar("g_vore_neighborprey_distance") && self.predator == other.predator && !(chase || other.classname == "observer"))\r
{\r
self.alpha = default_player_alpha; // allow seeing neighboring prey\r
self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r
\r
RemoveGrabber(self); // Wazat's Grabber\r
\r
- Vore_DeadPrey_Detach(self);\r
- self.fakeprey = FALSE; // clear the fakeprey status\r
+ Vore_Disconnect();\r
self.swallow_progress_pred = self.swallow_progress_prey = 0;\r
\r
self.classname = "player";\r
remove(self);\r
return;\r
}\r
- if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten && self.owner.fakepredator.classname != "player")\r
+ if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && !self.owner.stat_eaten)\r
#ifdef TETRIS\r
|| self.owner.tetris_on\r
#endif\r
void CopyBody(float keepvelocity)\r
{\r
local entity oldself;\r
- if (self.fakeprey)\r
- return;\r
if (self.effects & EF_NODRAW || self.alpha < 0)\r
return;\r
oldself = self;\r
other = other.enemy; // also do this for the player we are spectating\r
\r
if not(chase || other.classname == "observer") // the observer check prevents a bug\r
- if(other.predator == self.owner || other.fakepredator == self.owner)\r
+ if(other.predator == self.owner)\r
{\r
setmodel(self, "");\r
return TRUE;\r
self.effects &~= EF_NODEPTHTEST;\r
if not(self.owner.stat_eaten)\r
setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3"));\r
- else if(cvar("g_vore_neighborprey_distance") && (other.predator == self.owner.predator || other.fakepredator == self.owner.predator) && !(chase || other.classname == "observer"))\r
+ else if(cvar("g_vore_neighborprey_distance") && other.predator == self.owner.predator && !(chase || other.classname == "observer"))\r
{\r
setmodel(self, strcat("models/weapons/v_", self.owner.weaponname, ".md3")); // allow seeing neighboring prey's weapon model\r
self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r
e.predator = world;\r
}\r
\r
-void Vore_DeadPrey_Configure(entity e)\r
-{\r
- // ran when the keepdeadprey feature is enabled and prey stays inside the stomach after dying\r
-\r
- if(e.fakeprey || !e.stat_eaten) // we already configured everything\r
- return;\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
- Vore_SetPreyPositions(e.predator);\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.predator = world;\r
-\r
- // now put our dead prey inside the predator's stomach, but only as an effect\r
- e.movetype = MOVETYPE_FOLLOW;\r
- e.takedamage = DAMAGE_NO;\r
- e.solid = SOLID_NOT;\r
- e.aiment = e.fakepredator;\r
-}\r
-\r
-void Vore_DeadPrey_Detach(entity e)\r
-{\r
- // ran when dead prey must be detached from the stomach (eg: they are respawning)\r
- // should only execute after Vore_DeadPrey_Configure has ran first\r
-\r
- if not(cvar("g_vore_keepdeadprey"))\r
- return;\r
-\r
- e.fakepredator = world;\r
- e.fakeprey = TRUE; // keep fakeprey status\r
- e.stat_eaten = 0;\r
- e.aiment = world;\r
- e.movetype = MOVETYPE_TOSS;\r
-}\r
-\r
-void Vore_PreyRelease(entity e, float pred_disconnect)\r
-{\r
- if(pred_disconnect)\r
- {\r
- if(e.fakeprey)\r
- Vore_DeadPrey_Detach(e);\r
- else\r
- Vore_Regurgitate(e);\r
- }\r
- else if(self.stat_eaten && !self.fakeprey)\r
- {\r
- // if the keepdeadprey feature is on, don't spit a dead prey's carcass out\r
- if(e.deadflag != DEAD_NO && random() < cvar("g_vore_keepdeadprey"))\r
- Vore_DeadPrey_Configure(e);\r
- else\r
- Vore_Regurgitate(e);\r
- }\r
-}\r
-\r
void Vore_Disconnect()\r
{\r
// frees prey from their predators when someone disconnects or goes spectating, or in other circumstances\r
\r
// prey disconnects or goes spectating while inside someone's belly\r
if(self.stat_eaten)\r
- Vore_PreyRelease(self, TRUE);\r
+ Vore_Regurgitate(self);\r
\r
// pred disconnects or goes spectating with players in their belly\r
entity head;\r
FOR_EACH_PLAYER(head)\r
{\r
- if(head.predator == self || head.fakepredator == self)\r
- Vore_PreyRelease(head, TRUE);\r
+ if(head.predator == self)\r
+ Vore_Regurgitate(head);\r
}\r
Vore_GurgleSound(); // stop the gurgling sound\r
\r
\r
// set all vore stats\r
Vore_SetSbarRings();\r
- if(self.fakepredator.classname == "player")\r
- self.stat_eaten = num_for_edict(self.fakepredator);\r
- else if(self.predator.classname == "player")\r
+ if(self.predator.classname == "player")\r
{\r
self.stat_stomachload = self.predator.stomach_load; // necessary for the stomach board\r
self.stat_stomachmaxload = self.predator.stomach_maxload; // necessary for the stomach board\r
\r
if(self.deadflag != DEAD_NO) // we're dead, do what we must\r
{\r
- Vore_PreyRelease(self, FALSE);\r
+ Vore_Regurgitate(self);\r
return;\r
}\r
\r
- if(self.fakeprey) // detach dead prey if their predator died or got eaten\r
- if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten)\r
- Vore_DeadPrey_Detach(self);\r
if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x\r
{\r
Vore_Regurgitate(self);\r
void Vore();\r
void Vore_Regurgitate(entity e);\r
void Vore_Disconnect();\r
-void Vore_DeadPrey_Detach(entity e);\r
\r
entity Swallow_player_check();\r
float Swallow_condition_check(entity prey);
\ No newline at end of file