Unstable 1.8.4.0

This commit is contained in:
Markus Isberg
2025-03-12 12:56:27 +00:00
parent a4c3e868e4
commit a4a3427e4e
627 changed files with 29860 additions and 10018 deletions
@@ -16,6 +16,8 @@ namespace Barotrauma
public readonly bool Stream;
public readonly bool IgnoreMuffling;
public readonly bool MuteBackgroundMusic;
public readonly string? Filename;
private RoundSound(ContentXElement element, Sound sound)
@@ -26,6 +28,7 @@ namespace Barotrauma
Range = element.GetAttributeFloat("range", 1000.0f);
Volume = element.GetAttributeFloat("volume", 1.0f);
IgnoreMuffling = element.GetAttributeBool("dontmuffle", false);
MuteBackgroundMusic = element.GetAttributeBool("MuteBackgroundMusic", false);
FrequencyMultiplierRange = new Vector2(1.0f);
string freqMultAttr = element.GetAttributeString("frequencymultiplier", element.GetAttributeString("frequency", "1.0"));
@@ -73,9 +76,16 @@ namespace Barotrauma
}
Sound? existingSound = null;
if (roundSoundByPath.TryGetValue(filename.FullPath, out RoundSound? rs) && rs.Sound is { Disposed: false })
if (roundSoundByPath.TryGetValue(filename.FullPath, out RoundSound? rs))
{
existingSound = rs.Sound;
if (rs.Sound is { Disposed: false })
{
existingSound = rs.Sound;
}
else
{
roundSoundByPath.Remove(filename.FullPath);
}
}
if (existingSound is null)