From: Mario Date: Wed, 4 Sep 2019 09:37:51 +0000 (+1000) Subject: If an attack would be fatal, don't play the armor hit sound X-Git-Tag: xonotic-v0.8.5~1324 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=141729ea9d5f5b2010eac77723399a6e20aaeeff;p=xonotic%2Fxonotic-data.pk3dir.git If an attack would be fatal, don't play the armor hit sound --- diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index c39f59e72..9e67050cb 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -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);