From 93f18e840daad81541b44125261bfa696f14c3d2 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 11 Jul 2020 14:35:50 +1000 Subject: [PATCH] Play teamshoot player sounds for team damage in teamplay_mode 2, fixes #2479 --- qcsrc/server/g_damage.qc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 48aa78bcf..33627e24a 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -619,7 +619,15 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de damage = 0; else if(attacker != targ) { - if(autocvar_teamplay_mode == 3) + if(autocvar_teamplay_mode == 2) + { + if(IS_PLAYER(targ) && !IS_DEAD(targ)) + { + attacker.dmg_team = attacker.dmg_team + damage; + complainteamdamage = attacker.dmg_team - autocvar_g_teamdamage_threshold; + } + } + else if(autocvar_teamplay_mode == 3) damage = 0; else if(autocvar_teamplay_mode == 4) { -- 2.39.2