If an attack would be fatal, don't play the armor hit sound
authorMario <mario@smbclan.net>
Wed, 4 Sep 2019 09:37:51 +0000 (19:37 +1000)
committerMario <mario@smbclan.net>
Wed, 4 Sep 2019 09:37:51 +0000 (19:37 +1000)
qcsrc/server/player.qc

index c39f59e..9e67050 100644 (file)
@@ -398,7 +398,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
 
        if(sound_allowed(MSG_BROADCAST, attacker))
        {
-               if (save > 10)
+               if (save > 10 && (dh - take) > 0) // don't play armor sound if the attack is fatal
                        sound (this, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
                else if (take > 30)
                        sound (this, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);