]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Negate fall damage while carrying jump buff
authorMario <zacjardine@y7mail.com>
Fri, 13 Mar 2015 19:17:27 +0000 (06:17 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 13 Mar 2015 19:17:27 +0000 (06:17 +1100)
qcsrc/server/mutators/mutator_buffs.qc

index 5d16d94d7918b693ebed7deb913d6bd0ebb8e1eb..a704b728449e077b0ecfff198169c4867226f1e7 100644 (file)
@@ -418,6 +418,10 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerDamage_Calculate)
        if(random() <= autocvar_g_buffs_medic_survive_chance)
                frag_damage = max(5, frag_target.health - autocvar_g_buffs_medic_survive_health);
 
+       if(frag_target.buffs & BUFF_JUMP)
+       if(frag_deathtype == DEATH_FALL)
+               frag_damage = 0;
+
        if(frag_target.buffs & BUFF_VENGEANCE)
        if(frag_attacker)
        if(frag_attacker != frag_target)