]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Vampire: also steal armor if the target has any
authorMario <zacjardine@y7mail.com>
Fri, 13 Mar 2015 19:30:35 +0000 (06:30 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 13 Mar 2015 19:30:35 +0000 (06:30 +1100)
qcsrc/server/mutators/mutator_buffs.qc

index a704b728449e077b0ecfff198169c4867226f1e7..16ea5f2749e0ea9db4e416e521d2350ac8f51cda 100644 (file)
@@ -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;
 }