Очередной фикс этой хуйни (#214)

Co-authored-by: Mona Hmiza <>
This commit is contained in:
RavMorgan
2023-07-20 12:49:26 +03:00
committed by Aviu00
parent ff220a4c26
commit 4d5c60d792

View File

@@ -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;