diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Animation/Ragdoll.cs b/Barotrauma/BarotraumaClient/Source/Characters/Animation/Ragdoll.cs index da396dad7..043ecd319 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Animation/Ragdoll.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Animation/Ragdoll.cs @@ -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) diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs b/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs index 0db66467c..5e2696495 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs @@ -296,6 +296,7 @@ namespace Barotrauma break; } } + SoundPlayer.PlayDamageSound(damageSoundType, Math.Max(damage, bleedingDamage), WorldPosition); } // Always spawn damage particles diff --git a/Barotrauma/BarotraumaShared/SharedContent.projitems b/Barotrauma/BarotraumaShared/SharedContent.projitems index 8faee02a2..87350b127 100644 --- a/Barotrauma/BarotraumaShared/SharedContent.projitems +++ b/Barotrauma/BarotraumaShared/SharedContent.projitems @@ -2004,6 +2004,27 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs index a1c3bc6a6..8eaca9be2 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs @@ -692,7 +692,7 @@ namespace Barotrauma ImpactProjSpecific(impact, f1.Body); } - public void SeverLimbJoint(LimbJoint limbJoint) + public void SeverLimbJoint(LimbJoint limbJoint, bool playSound = true) { if (!limbJoint.CanBeSevered || limbJoint.IsSevered) { @@ -721,7 +721,7 @@ namespace Barotrauma } } - partial void SeverLimbJointProjSpecific(LimbJoint limbJoint); + partial void SeverLimbJointProjSpecific(LimbJoint limbJoint, bool playSound = true); private void GetConnectedLimbs(List connectedLimbs, List checkedJoints, Limb limb) { diff --git a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs index 7dafed938..71c930f3a 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs @@ -489,6 +489,25 @@ namespace Barotrauma } } + public string DisplayName + { + get; + private set; + } + + private string roomName; + [Editable, Serialize("", true, translationTextTag: "RoomName.")] + public string RoomName + { + get { return roomName; } + set + { + if (roomName == value) { return; } + roomName = value; + DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; + } + } + public override Rectangle Rect { get