From: MirceaKitsune Date: Mon, 30 Jan 2012 21:25:19 +0000 (+0200) Subject: Don't pickup health items when they no longer offer a health boost. This was removed... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb130e03b1d57e77c40d0e5c949555c951ee343f;p=voretournament%2Fvoretournament.git Don't pickup health items when they no longer offer a health boost. This was removed when consumable items were added. The rule is however cvared, in case there's any use to eat health items after they offer no health boost. --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index bdcf77a8..c4de2504 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -84,6 +84,7 @@ set g_balance_pause_armor_rot_spawn 5 set g_balance_health_regenstable 25 set g_balance_health_rotstable 150 set g_balance_health_limit 200 +set g_balance_health_consumable_alwayspickup 0 set g_balance_armor_regenstable 100 set g_balance_armor_rotstable 100 set g_balance_armor_limit 100 diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 00205205..299632a8 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -360,6 +360,7 @@ void Item_DroppedConsumable_Touch() // give the consumable item to the player touching it if not(other.stomach_load + self.dmg > other.stomach_maxload || other.stomach_load + self.initdmg > other.stomach_maxload) + if not(!cvar("g_balance_health_consumable_alwayspickup") && other.health >= self.max_health) { Item_Consumable_Spawn(self, other); remove(self); @@ -480,6 +481,7 @@ float Item_GiveTo(entity item, entity player) if(item.dmg) // consumable item { if(player.stomach_load + item.dmg <= player.stomach_maxload) + if not(!cvar("g_balance_health_consumable_alwayspickup") && player.health >= item.max_health) { pickedup = TRUE; Item_Consumable_Spawn(self, player);