return;\r
\r
entity e;\r
- float prey_mass;\r
+ float prey_mass, final_load;\r
\r
// apply the stomach capacity of the predator\r
self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity");\r
self.stomach_maxload *= self.scale;\r
self.stomach_maxload = ceil(self.stomach_maxload);\r
\r
- self.stomach_load = 0; // start from zero\r
FOR_EACH_PLAYER(e)\r
{\r
if(e.predator == self)\r
{\r
+ if(self.cvar_cl_vore_autodigest > 1)\r
+ Vore_AutoDigest(self);\r
prey_mass = cvar("g_balance_vore_load_prey_mass");\r
if(cvar("g_healthsize"))\r
prey_mass *= e.scale;\r
- self.stomach_load += ceil(prey_mass);\r
- if(self.cvar_cl_vore_autodigest > 1)\r
- Vore_AutoDigest(self);\r
+ final_load += ceil(prey_mass);\r
}\r
}\r
for(e = world; (e = find(e, classname, "consumable")); )\r
{\r
if(e.predator == self)\r
{\r
- self.stomach_load += ceil(e.dmg);\r
if(self.cvar_cl_vore_autodigest > 0)\r
Vore_AutoDigest(self);\r
+ final_load += ceil(e.dmg);\r
}\r
}\r
+ self.stomach_load = final_load;\r
\r
// apply weight\r
self.gravity = 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight");\r