]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use GivePlayerHealth in Vampire.
authorLyberta <lyberta@lyberta.net>
Sat, 26 Aug 2017 15:42:29 +0000 (18:42 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 26 Aug 2017 15:42:29 +0000 (18:42 +0300)
qcsrc/common/mutators/mutator/vampire/sv_vampire.qc

index 3a435c5ed1dea13ad797e4097e1a79c749b319cf..92c5943c3d75455f7bc3d41b6f95184df7ba8555 100644 (file)
@@ -12,8 +12,7 @@ MUTATOR_HOOKFUNCTION(vampire, PlayerDamage_SplitHealthArmor)
        if(frag_target != frag_attacker)
        if(!IS_DEAD(frag_target))
        {
-               frag_attacker.health += bound(0, damage_take, frag_target.health);
-               frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit);
+               GivePlayerHealth(frag_attacker, bound(0, damage_take, frag_target.health));
        }
 }