]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/player.qc
Fix moveplayer command examples
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / player.qc
index c39f59e7213d3edad4bcbab165b01e7e091ccff5..9bf3f7c60283db691cbfa8430aeba0ad4a504aec 100644 (file)
@@ -369,7 +369,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
 
        if(attacker == this)
        {
-               // don't reset pushltime for this damage as it may be an attempt to
+               // don't reset pushltime for self damage as it may be an attempt to
                // escape a lava pit or similar
                //this.pushltime = 0;
                this.istypefrag = 0;
@@ -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);