fix team damage mitigating self damage

master
an 2019-09-19 19:37:40 -04:00
parent ae5c37af74
commit c817ef05df
1 changed files with 6 additions and 2 deletions

View File

@ -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";
};
/*