From: MirceaKitsune Date: Mon, 18 Jul 2011 13:59:29 +0000 (+0300) Subject: Fix distributed digestion X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7b11afa0793bb84abf5529d6a6e03179d2d18cf3;p=voretournament%2Fvoretournament.git Fix distributed digestion --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index d540beda..37d62074 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -512,18 +512,16 @@ void Vore_Digest() { // if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach float vore_offset; - if(cvar("g_balance_vore_digestion_distribute")) - vore_offset = self.predator.stomach_maxload / self.predator.stomach_load; - else - vore_offset = 1; + vore_offset = 1; + if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage + vore_offset *= self.predator.stomach_load / self.predator.stomach_maxload; + if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff")) // apply player scale to digestion damage + vore_offset *= pow(self.scale / self.predator.scale, cvar("g_balance_vore_digestion_scalediff")); + vore_offset = ceil(vore_offset); float damage; damage = cvar("g_balance_vore_digestion_damage") / vore_offset; - // apply player scale to digestion damage - if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff")) - damage *= pow(self.predator.scale / self.scale, cvar("g_balance_vore_digestion_scalediff")); - Damage(self, self.predator, self.predator, damage, DEATH_DIGESTION, self.origin, '0 0 0'); if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable")) self.predator.health += cvar("g_balance_vore_digestion_vampire") / vore_offset;