- 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);
+ float amount = bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal,
+ GetResourceAmount(frag_target, RESOURCE_HEALTH));
+ GiveResourceWithLimit(frag_attacker, RESOURCE_HEALTH, amount, g_pickup_healthsmall_max);
+ if (frag_target.armorvalue)
+ {
+ amount = bound(0, frag_damage * autocvar_g_buffs_vampire_damage_steal,
+ GetResourceAmount(frag_target, RESOURCE_ARMOR));
+ GiveResourceWithLimit(frag_attacker, RESOURCE_ARMOR, amount, g_pickup_armorsmall_max);
+ }