From: MirceaKitsune Date: Sat, 19 Nov 2011 15:11:59 +0000 (+0200) Subject: Fix a bug with picking partly consumed items back up X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f8d86f7d12adcc9c189b5239b6f9a7867763b85c;p=voretournament%2Fvoretournament.git Fix a bug with picking partly consumed items back up --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 092b287d..6d9dfadf 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -315,9 +315,17 @@ void Item_Consumable_Spawn(entity e, entity pl) item.solid = SOLID_NOT; setmodel(item, e.model); item.health = e.health; - item.inithealth = e.health; + if(e.inithealth) + { + item.inithealth = e.inithealth; + item.initdmg = e.initdmg; + } + else + { + item.inithealth = e.health; + item.initdmg = e.dmg; + } item.max_health = e.max_health; - item.initdmg = e.dmg; item.predator = pl; item.aiment = pl; @@ -366,8 +374,8 @@ void Item_DroppedConsumable_Spawn(entity e) setmodel(item, e.model); item.health = e.health; item.inithealth = e.inithealth; - item.max_health = e.max_health; item.initdmg = e.initdmg; + item.max_health = e.max_health; item.scale = e.scale; item.colormod = e.colormod;