Fixed dedicated servers ignoring armor
This commit is contained in:
@@ -363,22 +363,23 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CLIENT
|
|
||||||
float bloodAmount = hitArmor || bleedingAmount <= 0.0f ? 0 : (int)Math.Min((int)(amount * 2.0f), 20);
|
|
||||||
|
|
||||||
DamageSoundType damageSoundType = (damageType == DamageType.Blunt) ? DamageSoundType.LimbBlunt : DamageSoundType.LimbSlash;
|
|
||||||
|
|
||||||
if (hitArmor)
|
if (hitArmor)
|
||||||
{
|
{
|
||||||
totalArmorValue = Math.Max(totalArmorValue, 0.0f);
|
totalArmorValue = Math.Max(totalArmorValue, 0.0f);
|
||||||
|
|
||||||
damageSoundType = DamageSoundType.LimbArmor;
|
|
||||||
amount = Math.Max(0.0f, amount - totalArmorValue);
|
amount = Math.Max(0.0f, amount - totalArmorValue);
|
||||||
bleedingAmount = Math.Max(0.0f, bleedingAmount - totalArmorValue);
|
bleedingAmount = Math.Max(0.0f, bleedingAmount - totalArmorValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CLIENT
|
||||||
if (playSound)
|
if (playSound)
|
||||||
{
|
{
|
||||||
|
DamageSoundType damageSoundType = (damageType == DamageType.Blunt) ? DamageSoundType.LimbBlunt : DamageSoundType.LimbSlash;
|
||||||
|
if (hitArmor)
|
||||||
|
{
|
||||||
|
damageSoundType = DamageSoundType.LimbArmor;
|
||||||
|
}
|
||||||
|
|
||||||
SoundPlayer.PlayDamageSound(damageSoundType, amount, position);
|
SoundPlayer.PlayDamageSound(damageSoundType, amount, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user