From: MirceaKitsune Date: Sat, 19 Nov 2011 15:54:04 +0000 (+0200) Subject: Make each digesting item to grant health up to its max_health level only X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3d677b97a34f3d24e9f328635a2bb2c0ce8f8681;p=voretournament%2Fvoretournament.git Make each digesting item to grant health up to its max_health level only --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 975ea4ff..b43d4f69 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -260,7 +260,10 @@ void Item_Consumable_Think() damage = ceil(cvar("g_balance_vore_digestion_damage_item") / damage_offset); self.health -= damage; - self.predator.health += damage; + if(self.predator.health + damage <= self.max_health) + self.predator.health += damage; + else if(self.predator.health < self.max_health) + self.predator.health = self.max_health; self.predator.pauserothealth_finished = max(self.predator.pauserothealth_finished, time + cvar("g_balance_pause_health_rot")); self.item_digestion_step = time + vore_steptime;