Adds footstep sound variety, makes diving and clown suits have unique footstep sounds!
https://puu.sh/yQ8fs/61e12f15c6.webm TODO: Get rid of the "damagesoundtype" system and replace it with simple "tag" checking to allow customizability from content pack side Fix damagemodifier sounds never being played (I've never once heard LimbArmor play on anything but mantis)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FarseerPhysics;
|
||||
using Barotrauma.Items.Components;
|
||||
using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using FarseerPhysics.Dynamics.Joints;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -20,7 +21,12 @@ namespace Barotrauma
|
||||
if (impact > 3.0f && limb.HitSound != null && limb.SoundTimer <= 0.0f)
|
||||
{
|
||||
limb.SoundTimer = Limb.SoundInterval;
|
||||
limb.HitSound.Play(volume, impact * 100.0f, limb.WorldPosition);
|
||||
SoundPlayer.PlaySound(limb.HitSound, volume, impact * 100.0f, limb.WorldPosition);
|
||||
foreach(WearableSprite wearable in limb.WearingItems)
|
||||
{
|
||||
if (limb.type == wearable.Limb && wearable.Sound != null)
|
||||
SoundPlayer.PlaySound(wearable.Sound, volume, impact * 100.0f, limb.WorldPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (body.UserData is Limb || body == Collider.FarseerBody)
|
||||
|
||||
Reference in New Issue
Block a user