From: Mario Date: Sat, 11 Jul 2020 04:35:50 +0000 (+1000) Subject: Play teamshoot player sounds for team damage in teamplay_mode 2, fixes #2479 X-Git-Tag: xonotic-v0.8.5~886 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=93f18e840daad81541b44125261bfa696f14c3d2;p=xonotic%2Fxonotic-data.pk3dir.git Play teamshoot player sounds for team damage in teamplay_mode 2, fixes #2479 --- 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) {