Release 1.9.8.0 - Summer Update Hotfix 1

This commit is contained in:
Regalis11
2025-07-01 11:40:07 +03:00
parent fd34473640
commit 6661bb607b
18 changed files with 109 additions and 33 deletions
@@ -152,6 +152,8 @@ namespace Barotrauma
private bool ignoreMuffling;
private RoundSound lastPlayingSound;
private void PlaySound(Entity entity, Hull hull, Vector2 worldPosition)
{
if (sounds.Count == 0) { return; }
@@ -204,6 +206,7 @@ namespace Barotrauma
else
{
soundChannel.Position = new Vector3(worldPosition, 0.0f);
if (lastPlayingSound != null && lastPlayingSound.Stream) { lastPlayingSound.LastStreamSeekPos = soundChannel.StreamSeekPos; }
}
KeepLoopingSoundAlive(soundChannel);
@@ -248,6 +251,11 @@ namespace Barotrauma
ignoreMuffling = selectedSound.IgnoreMuffling;
if (soundChannel != null)
{
if (soundChannel.IsStream && lastPlayingSound == selectedSound)
{
soundChannel.StreamSeekPos = lastPlayingSound.LastStreamSeekPos;
}
lastPlayingSound = selectedSound;
soundChannel.Looping = loopSound;
KeepLoopingSoundAlive(soundChannel);
}