Update ContentAudioSystem.CP14AmbientLoop.cs

This commit is contained in:
Ed
2024-09-27 10:46:15 +03:00
parent b9e90f50ca
commit 558b38e51d

View File

@@ -80,6 +80,10 @@ public sealed partial class ContentAudioSystem
.WithLoop(true)
.WithVolume(proto.Sound.Params.Volume + _volumeSlider)
.WithPlayOffset(_random.NextFloat(0f, 100f)));
if (newLoop is null)
return;
_loopStreams.Add(proto, newLoop.Value.Entity);
FadeIn(newLoop.Value.Entity, newLoop.Value.Component, AmbientLoopFadeInTime);