From 4d5c60d7922ee798ae7930e2d131dce734dbcdd0 Mon Sep 17 00:00:00 2001 From: RavMorgan <48182970+RavMorgan@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:49:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=87=D0=B5=D1=80=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=84=D0=B8=D0=BA=D1=81=20=D1=8D=D1=82=D0=BE?= =?UTF-8?q?=D0=B9=20=D1=85=D1=83=D0=B9=D0=BD=D0=B8=20(#214)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mona Hmiza <> --- Content.Client/White/Jukebox/JukeboxSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Client/White/Jukebox/JukeboxSystem.cs b/Content.Client/White/Jukebox/JukeboxSystem.cs index 8095e8fcfb..a0d50abc6a 100644 --- a/Content.Client/White/Jukebox/JukeboxSystem.cs +++ b/Content.Client/White/Jukebox/JukeboxSystem.cs @@ -237,7 +237,7 @@ public sealed class JukeboxSystem : EntitySystem private JukeboxAudio? TryCreateStream(JukeboxComponent jukeboxComponent, TransformComponent jukeboxXform, TransformComponent playerXform) { - if (jukeboxComponent.PlayingSongData == null) return null; + if (jukeboxComponent.PlayingSongData == null) return null!; var resourcePath = jukeboxComponent.PlayingSongData.SongPath!; @@ -250,11 +250,13 @@ public sealed class JukeboxSystem : EntitySystem } var playingStream = _clydeAudio.CreateAudioSource(audio.AudioStream); + if (playingStream == null) return null!; playingStream.Volume = _jukeboxVolume; playingStream.RolloffFactor = 3.5f; + playingStream.PlaybackPosition = jukeboxComponent.PlayingSongData.PlaybackPosition; playingStream.Position = jukeboxXform.MapPosition.Position;