\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
return;\r
\r
e.fakepredator = world;\r
+ e.fakeprey = FALSE;\r
e.aiment = world;\r
-\r
- if(!e.deadflag)\r
- e.fakeprey = FALSE;\r
+ e.movetype = MOVETYPE_TOSS;\r
}\r
\r
-void Vore_PreyRelease(entity e)\r
+void Vore_PreyRelease(entity e, float pred_disconnect)\r
{\r
// if the keepdeadprey feature is on, don't spit a dead prey's carcass out\r
if(e.health <= 0 && cvar("g_vore_keepdeadprey"))\r
{\r
- Vore_DeadPrey_Configure(e);\r
-\r
// if keepdeadprey is enabled and the predator disconnected, detach the dead prey\r
- if(e.fakepredator.classname != "player")\r
- Vore_DeadPrey_Detach(e);\r
+ if(pred_disconnect)\r
+ {\r
+ if(e.fakeprey)\r
+ Vore_DeadPrey_Detach(e);\r
+ }\r
+ else\r
+ Vore_DeadPrey_Configure(e);\r
}\r
else\r
Vore_Regurgitate(e);\r
\r
// prey disconnects or goes spectating while inside someone's belly\r
if(self.predator.classname == "player")\r
- Vore_PreyRelease(self);\r
+ Vore_PreyRelease(self, TRUE);\r
\r
// pred disconnects or goes spectating with players in their belly\r
- else if(self.stomach_load > 0)\r
+ entity head;\r
+ FOR_EACH_PLAYER(head)\r
{\r
- entity head;\r
- FOR_EACH_PLAYER(head)\r
- {\r
- if(head.predator == self)\r
- Vore_PreyRelease(head);\r
- }\r
- Vore_GurgleSound(); // stop the gurgling sound\r
+ if(head.predator == self || head.fakepredator == self)\r
+ Vore_PreyRelease(head, TRUE);\r
}\r
+ Vore_GurgleSound(); // stop the gurgling sound\r
\r
self.stomach_load = self.gravity = 0; // prevents a bug\r
}\r
\r
if(self.deadflag)\r
{\r
- Vore_PreyRelease(self);\r
+ Vore_PreyRelease(self, FALSE);\r
return;\r
}\r
\r