summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 6d8e5c1c..d9668296 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -1019,7 +1019,18 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
if( targ != attacker && OnSameTeam( targ, attacker ) )
{
if( !g_friendlyFire.integer )
- return;
+ {
+ if( !g_friendlyFireHumans.integer
+ && targ->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ {
+ return;
+ }
+ if( !g_friendlyFireAliens.integer
+ && targ->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ {
+ return;
+ }
+ }
}
// If target is buildable on the same team as the attacking client