]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Also don't apply sound-based damage to teammates
authorMario <mario.mario@y7mail.com>
Sun, 19 Jul 2020 13:08:11 +0000 (23:08 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 19 Jul 2020 13:08:11 +0000 (23:08 +1000)
qcsrc/server/g_damage.qc

index 9eb3d86eb65834cd10dd2784657b260b56ed1ef4..626b3e5ac9deb549962da400657d4d0044659fca 100644 (file)
@@ -585,8 +585,8 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de
 
        entity attacker_save = attacker;
 
-       // special rule: gravity bomb does not hit team mates (other than for disconnecting the hook)
-       if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || DEATH_ISWEAPON(deathtype, WEP_TUBA))
+       // special rule: gravity bombs and sound-based attacks do not affect team mates (other than for disconnecting the hook)
+       if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || (deathtype & HITTYPE_SOUND))
        {
                if(IS_PLAYER(targ) && SAME_TEAM(targ, attacker))
                {