From: Mario Date: Fri, 13 Mar 2015 19:30:35 +0000 (+1100) Subject: Vampire: also steal armor if the target has any X-Git-Tag: xonotic-v0.8.1~18^2~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2de509d29e43285ab1ff36e536cc52b86ed300e2;p=xonotic%2Fxonotic-data.pk3dir.git Vampire: also steal armor if the target has any --- diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index a704b7284..16ea5f274 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -485,7 +485,11 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate) if(!frag_target.frozen) if(frag_target.takedamage) if(DIFF_TEAM(frag_attacker, frag_target)) + { frag_attacker.health = bound(0, frag_attacker.health + bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal, frag_target.health), g_pickup_healthsmall_max); + if(frag_target.armorvalue) + frag_attacker.armorvalue = bound(0, frag_attacker.armorvalue + bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal, frag_target.armorvalue), g_pickup_armorsmall_max); + } return false; }