]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove environment immunity
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Dec 2014 00:03:50 +0000 (11:03 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Dec 2014 00:03:50 +0000 (11:03 +1100)
qcsrc/server/mutators/gamemode_infection.qc

index a1c92bd7a2215d7ab1c532f19ebce9c24824f744..d56fddbe4620433332f950ca402ff0f894b974c7 100644 (file)
@@ -225,11 +225,9 @@ MUTATOR_HOOKFUNCTION(infection_PlayerPreThink)
 MUTATOR_HOOKFUNCTION(infection_PlayerDamage_Calculate)
 {
        if (
-       (IS_PLAYER(frag_attacker) && frag_attacker.infectioncolor == frag_target.infectioncolor && frag_attacker != frag_target)
-       || (frag_deathtype == DEATH_FALL)
-       || (frag_deathtype == DEATH_DROWN)
-       || (frag_deathtype == DEATH_SLIME)
-       || (frag_deathtype == DEATH_LAVA)
+       IS_PLAYER(frag_attacker) // Allow environment damage
+       && frag_attacker != frag_target  // Allow self damage
+       && frag_attacker.infectioncolor == frag_target.infectioncolor // Block friendly fire
        )
        {
                frag_damage = 0;