Audio channel states visible in debug view + some sound fixes:

- a short "cooldown" after each footstep sound (prevents the sound playing multiple times during one footstep)
- water flow sounds are only played by one of the hulls a gap is between
- flow rate affects the range of the flow sound
This commit is contained in:
Regalis
2016-10-09 19:25:14 +03:00
parent ef9dce9a0d
commit d4e9116b0f
4 changed files with 77 additions and 132 deletions
@@ -422,7 +422,11 @@ namespace Barotrauma
float volume = stairs == null ? impact / 5.0f : impact;
volume = Math.Min(impact, 1.0f);
if (impact > 0.8f && l.HitSound != null && l.soundTimer <= 0.0f) l.HitSound.Play(volume, impact * 100.0f, l.WorldPosition);
if (impact > 0.5f && l.HitSound != null && l.soundTimer <= 0.0f)
{
l.soundTimer = Limb.SoundInterval;
l.HitSound.Play(volume, impact * 250.0f, l.WorldPosition);
}
if (impact > l.impactTolerance)
{