(6c6831abf) Some new sounds, fixed damage sounds not being played if no damage modifiers are applied
This commit is contained in:
@@ -393,7 +393,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
partial void SeverLimbJointProjSpecific(LimbJoint limbJoint)
|
||||
partial void SeverLimbJointProjSpecific(LimbJoint limbJoint, bool playSound = true)
|
||||
{
|
||||
foreach (Limb limb in new Limb[] { limbJoint.LimbA, limbJoint.LimbB })
|
||||
{
|
||||
@@ -411,6 +411,11 @@ namespace Barotrauma
|
||||
character.CurrentHull?.AddDecal(character.BloodDecalName, limb.WorldPosition, MathHelper.Clamp(limb.Mass, 0.5f, 2.0f));
|
||||
}
|
||||
}
|
||||
|
||||
if (playSound)
|
||||
{
|
||||
SoundPlayer.PlayDamageSound("Gore", 1.0f, limbJoint.LimbA.body);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Draw(SpriteBatch spriteBatch, Camera cam)
|
||||
|
||||
@@ -598,6 +598,7 @@ namespace Barotrauma
|
||||
var limbHealth = limbHealths.OrderByDescending(l => l.TotalDamage).FirstOrDefault();
|
||||
selectedLimbIndex = limbHealths.IndexOf(limbHealth);
|
||||
}
|
||||
|
||||
}
|
||||
LimbHealth selectedLimb = selectedLimbIndex < 0 ? highlightedLimb : limbHealths[selectedLimbIndex];
|
||||
if (selectedLimb != currentDisplayedLimb || forceAfflictionContainerUpdate)
|
||||
|
||||
@@ -296,6 +296,7 @@ namespace Barotrauma
|
||||
break;
|
||||
}
|
||||
}
|
||||
SoundPlayer.PlayDamageSound(damageSoundType, Math.Max(damage, bleedingDamage), WorldPosition);
|
||||
}
|
||||
|
||||
// Always spawn damage particles
|
||||
|
||||
Reference in New Issue
Block a user