{\r
// if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach\r
float vore_offset;\r
- if(cvar("g_balance_vore_digestion_distribute"))\r
- vore_offset = self.predator.stomach_maxload / self.predator.stomach_load;\r
- else\r
- vore_offset = 1;\r
+ vore_offset = 1;\r
+ if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage\r
+ vore_offset *= self.predator.stomach_load / self.predator.stomach_maxload;\r
+ if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff")) // apply player scale to digestion damage\r
+ vore_offset *= pow(self.scale / self.predator.scale, cvar("g_balance_vore_digestion_scalediff"));\r
+ vore_offset = ceil(vore_offset);\r
\r
float damage;\r
damage = cvar("g_balance_vore_digestion_damage") / vore_offset;\r
\r
- // apply player scale to digestion damage\r
- if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff"))\r
- damage *= pow(self.predator.scale / self.scale, cvar("g_balance_vore_digestion_scalediff"));\r
-\r
Damage(self, self.predator, self.predator, damage, DEATH_DIGESTION, self.origin, '0 0 0');\r
if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable"))\r
self.predator.health += cvar("g_balance_vore_digestion_vampire") / vore_offset;\r