if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
{\r
Client_setmodel(setmodel_state());\r
- if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+ if not(self.predator.classname == "player" || self.fakeprey)\r
self.alpha = default_player_alpha;\r
return TRUE;\r
}\r
return TRUE;\r
}\r
Client_setmodel(setmodel_state());\r
- if not(self.predator.classname == "player" || self.fakepredator.classname == "player")\r
+ if not(self.predator.classname == "player" || self.fakeprey)\r
self.alpha = default_player_alpha;\r
return TRUE;\r
}\r
\r
RemoveGrabber(self); // Wazat's Grabber\r
\r
- Vore_DeadPrey_Detach(self);\r
-\r
self.classname = "player";\r
self.wasplayer = TRUE;\r
self.iscreature = TRUE;\r
\r
SetCustomizer(self, Client_customizeentityforclient, Client_uncustomizeentityforclient);\r
\r
+ Vore_DeadPrey_Detach(self);\r
+\r
self.model = "";\r
FixPlayermodel();\r
\r
void CopyBody(float keepvelocity)\r
{\r
local entity oldself;\r
- if (self.fakepredator.classname == "player")\r
+ if (self.fakeprey)\r
return;\r
if (self.effects & EF_NODRAW || self.alpha < 0)\r
return;\r
.float digesting;\r
.float stomach_load;\r
.float weapon_delay;\r
+.float fakeprey;\r
.float stat_eaten, stat_stomachload, stat_digesting, stat_canleave;\r
\r
// Fields\r
{\r
// ran when the fulldigest feature is enabled and prey stays inside the stomach after dying\r
\r
- if(e.fakepredator.classname == "player" || e.predator.classname != "player") // already configured\r
+ if(e.fakeprey || e.predator.classname != "player") // already configured\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
\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
\r
// completely remove the dead body\r
e.alpha = -1;\r
- setmodel(e, "");\r
}\r
\r
void Vore_DeadPrey_Detach(entity e)\r
\r
e.fakepredator = world;\r
e.aiment = world;\r
+\r
+ if(!e.deadflag)\r
+ e.fakeprey = FALSE;\r
}\r
\r
void Vore_PreyRelease(entity e)\r