From c817ef05dffa7c9b3cbb4f1fbbe5931f05260174 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Thu, 19 Sep 2019 19:37:40 -0400 Subject: [PATCH] fix team damage mitigating self damage --- source/combat.qc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/combat.qc b/source/combat.qc index 04ebcfe..59a05b2 100644 --- a/source/combat.qc +++ b/source/combat.qc @@ -1,11 +1,15 @@ // combat.qc: entity-entity damage functions float(entity targ, entity attacker) SameTeam = { - return targ.team > 0 && targ.team == attacker.team; + return targ != attacker && + targ.team > 0 && + targ.team == attacker.team; }; float(entity targ, entity attacker) BothPlayers = { - return targ.classname == "player" && attacker.classname == "player"; + return targ != attacker && + targ.classname == "player" && + attacker.classname == "player"; }; /*