if(self.hold_BUTTON_ATCK)
self.BUTTON_ATCK = TRUE;
- // deciding what to do with a victim:
-
+ // deciding what to do with victims
if(self.stomach_load && time > self.decide_pred)
{
- // if the predator's stomach contains only dead prey, and he has reached the maximum amount of health
- // 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
+ // if the predator's stomach contains only dead prey or items, and he has reached the maximum amount of health
+ // he can gain from digestion, there's no reason to keep dead prey or food any longer
+ if(skill >= 9) // such awareness comes from skill level 9 and up
{
+ entity e;
+ float consumables;
+ for(e = world; (e = find(e, classname, "consumable")); )
+ {
+ if(e.predator == self)
+ consumables += e.health;
+ }
+
if(!Stomach_HasLivePrey(self))
- if(self.health >= cvar("g_balance_vore_digestion_vampire_stable"))
+ if not(cvar("g_balance_vore_digestion_limit") < 0 && self.health < cvar("g_balance_vore_digestion_vampire_stable"))
+ if not(consumables && self.health < min(min(g_pickup_healthsmall_max, g_pickup_healthmedium_max), min(g_pickup_healthlarge_max, g_pickup_healthmega_max)))
self.BUTTON_REGURGITATE = TRUE;
}