// he can gain from digestion, there's no reason to keep the dead prey any longer
if(cvar("g_balance_vore_digestion_limit") < 0 && skill >= 9) // such awareness comes from skill level 9 and up
{
- float found_live_prey;
- FOR_EACH_PLAYER(head)
- {
- if(head.predator == self)
- if(head.deadflag == DEAD_NO)
- found_live_prey = TRUE;
- }
-
- if(!found_live_prey)
+ if(!Stomach_HasLivePrey(self))
if(self.health >= cvar("g_balance_vore_digestion_vampire_stable"))
self.BUTTON_REGURGITATE = TRUE;
}
return FALSE;\r
}\r
\r
+float Stomach_HasLivePrey(entity pred)\r
+{\r
+ entity head;\r
+ FOR_EACH_PLAYER(head)\r
+ {\r
+ if(head.predator == pred)\r
+ if(head.deadflag == DEAD_NO)\r
+ return TRUE;\r
+ }\r
+ return FALSE;\r
+}\r
+\r
float Vore_CanLeave()\r
{\r
if(self.stat_eaten)\r
float taunt_time;\r
\r
// predator taunts\r
- if(self.stomach_load && !Stomach_TeamMates_check(self))\r
+ if(self.stomach_load && !Stomach_TeamMates_check(self) && Stomach_HasLivePrey(self))\r
{\r
if(!self.taunt_soundtime) // taunt_soundtime becomes 0 once the taunt has played\r
{\r
}\r
\r
// prey taunts\r
- if(self.stat_eaten && !(teams_matter && self.team == self.predator.team))\r
+ if(self.stat_eaten && !(teams_matter && self.team == self.predator.team) && self.deadflag == DEAD_NO)\r
{\r
if(!self.taunt_soundtime) // taunt_soundtime becomes 0 once the taunt has played\r
{\r
void Vore_Disconnect();\r
\r
entity Swallow_player_check();\r
-float Swallow_condition_check(entity prey);
\ No newline at end of file
+float Swallow_condition_check(entity prey);\r
+float Stomach_HasLivePrey(entity pred);
\ No newline at end of file