From 3d677b97a34f3d24e9f328635a2bb2c0ce8f8681 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 19 Nov 2011 17:54:04 +0200 Subject: [PATCH] Make each digesting item to grant health up to its max_health level only --- data/qcsrc/server/t_items.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2