]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fire inflicts no damage to inferno buff carriers, also lava damage is halved
authorMario <mario@smbclan.net>
Fri, 15 Jan 2016 14:58:19 +0000 (00:58 +1000)
committerMario <mario@smbclan.net>
Fri, 15 Jan 2016 14:58:19 +0000 (00:58 +1000)
qcsrc/common/mutators/mutator/buffs/buffs.qc

index f3632cbaf0abb1eff749350429ad9d503de9887d..ae786657b4944934d322299f8cfaf6d85f8ce93e 100644 (file)
@@ -577,6 +577,14 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
        if(frag_target != frag_attacker)
                frag_target.buff_disability_time = time + autocvar_g_buffs_disability_slowtime;
 
+       if(frag_target.buffs & BUFF_INFERNO.m_itemid)
+       {
+               if(frag_deathtype == DEATH_FIRE.m_id)
+                       frag_damage = 0;
+               if(frag_deathtype == DEATH_LAVA.m_id)
+                       frag_damage *= 0.5; // TODO: cvarize?
+       }
+
        if(frag_attacker.buffs & BUFF_INFERNO.m_itemid)
        if(frag_target != frag_attacker) {
                float btime = buff_Inferno_CalculateTime(