Fix #2126 "g_keepaway_noncarrier_damage disables damage by map objects"
authorterencehill <piuntn@gmail.com>
Sun, 28 Oct 2018 14:48:08 +0000 (15:48 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 28 Oct 2018 14:48:08 +0000 (15:48 +0100)
qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc

index 66acc2e455944eaddacb4df266d8da55e968a8ee..0b8144deb7d5ae5cf147f2a326bbc727a55510c5 100644 (file)
@@ -394,7 +394,7 @@ MUTATOR_HOOKFUNCTION(ka, Damage_Calculate) // for changing damage and force valu
                        frag_force *= autocvar_g_keepaway_ballcarrier_force;
                }
        }
-       else if (!frag_target.ballcarried) // if the target is a noncarrier
+       else if (IS_PLAYER(frag_attacker) && !frag_target.ballcarried) // if the target is a noncarrier
        {
                if(frag_target == frag_attacker) // damage done to yourself
                {