]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Play teamshoot player sounds for team damage in teamplay_mode 2, fixes #2479
authorMario <mario.mario@y7mail.com>
Sat, 11 Jul 2020 04:35:50 +0000 (14:35 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 11 Jul 2020 04:35:50 +0000 (14:35 +1000)
qcsrc/server/g_damage.qc

index 48aa78bcfba7ee17974aeb71a8f2ebb0c882653a..33627e24a2cc2f0cd49a748098d104240289390c 100644 (file)
@@ -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)
                                        {