]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Don't pickup health items when they no longer offer a health boost. This was removed...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 30 Jan 2012 21:25:19 +0000 (23:25 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 30 Jan 2012 21:25:19 +0000 (23:25 +0200)
data/balanceVT.cfg
data/qcsrc/server/t_items.qc

index bdcf77a8b168e11e30ec448279f49728c351a2a0..c4de250460bd9d26d7d0c13d05d93e562ec73d1a 100644 (file)
@@ -84,6 +84,7 @@ set g_balance_pause_armor_rot_spawn 5
 set g_balance_health_regenstable 25\r
 set g_balance_health_rotstable 150\r
 set g_balance_health_limit 200\r
+set g_balance_health_consumable_alwayspickup 0\r
 set g_balance_armor_regenstable 100\r
 set g_balance_armor_rotstable 100\r
 set g_balance_armor_limit 100\r
index 0020520521a07806c33a429d0f66f458bdf07a2e..299632a85e68797819e46b1d93031c2cbcb33880 100644 (file)
@@ -360,6 +360,7 @@ void Item_DroppedConsumable_Touch()
 \r
        // give the consumable item to the player touching it\r
        if not(other.stomach_load + self.dmg > other.stomach_maxload || other.stomach_load + self.initdmg > other.stomach_maxload)\r
+       if not(!cvar("g_balance_health_consumable_alwayspickup") && other.health >= self.max_health)\r
        {\r
                Item_Consumable_Spawn(self, other);\r
                remove(self);\r
@@ -480,6 +481,7 @@ float Item_GiveTo(entity item, entity player)
                        if(item.dmg) // consumable item\r
                        {\r
                                if(player.stomach_load + item.dmg <= player.stomach_maxload)\r
+                               if not(!cvar("g_balance_health_consumable_alwayspickup") && player.health >= item.max_health)\r
                                {\r
                                        pickedup = TRUE;\r
                                        Item_Consumable_Spawn(self, player);\r