]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix damage triggers
authorMario <zacjardine@y7mail.com>
Tue, 16 Dec 2014 10:58:53 +0000 (21:58 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 16 Dec 2014 10:58:53 +0000 (21:58 +1100)
qcsrc/server/mutators/gamemode_infection.qc

index 012e44213e00575577fd127a1d9a1442e8a18b6c..a1c92bd7a2215d7ab1c532f19ebce9c24824f744 100644 (file)
@@ -225,7 +225,7 @@ MUTATOR_HOOKFUNCTION(infection_PlayerPreThink)
 MUTATOR_HOOKFUNCTION(infection_PlayerDamage_Calculate)
 {
        if (
-       (frag_attacker.infectioncolor == frag_target.infectioncolor && frag_attacker != frag_target)
+       (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)
@@ -235,7 +235,7 @@ MUTATOR_HOOKFUNCTION(infection_PlayerDamage_Calculate)
                frag_damage = 0;
                frag_force = '0 0 0';
        }
-       return TRUE;
+       return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(infection_BotShouldAttack)