]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_vampire.qc
Merge remote-tracking branch 'origin/terencehill/cmd_fixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_vampire.qc
index 54b5b9f57028fd44723dd96abd6b8e60513d2dfb..40a925b3ce835fbc24c9b64f424d9022690dd0bc 100644 (file)
@@ -10,7 +10,7 @@ MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
        else
        {
                // otherwise: each hit gets damage back
-               frag_attacker.health += damage_take;
+               frag_attacker.health = frag_attacker.health + bound(0, damage_take, self.health);
        }
        return 0;
 }
@@ -29,7 +29,7 @@ MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsPrettyString)
 
 MUTATOR_DEFINITION(mutator_vampire)
 {
-       MUTATOR_HOOK(PlayerDamage, vampire_PlayerDamage, CBC_ORDER_ANY);
+       MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, vampire_PlayerDamage, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, vampire_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, vampire_BuildMutatorsPrettyString, CBC_ORDER_ANY);