From d7d0dde5d27c84cfb2e7380158d1c4e26b1cd40a Mon Sep 17 00:00:00 2001 From: Nathan Alo Date: Thu, 3 Jun 2021 13:56:14 +0800 Subject: [PATCH] use created storyboard to check for drawables instead --- .../Backgrounds/BeatmapBackgroundWithStoryboard.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/Backgrounds/BeatmapBackgroundWithStoryboard.cs b/osu.Game/Graphics/Backgrounds/BeatmapBackgroundWithStoryboard.cs index 1936482c90..9695e93f5d 100644 --- a/osu.Game/Graphics/Backgrounds/BeatmapBackgroundWithStoryboard.cs +++ b/osu.Game/Graphics/Backgrounds/BeatmapBackgroundWithStoryboard.cs @@ -22,16 +22,17 @@ namespace osu.Game.Graphics.Backgrounds [BackgroundDependencyLoader] private void load() { - if (!Beatmap.Storyboard.HasDrawable) - return; - var storyboard = new Storyboard { BeatmapInfo = Beatmap.BeatmapInfo }; + foreach (var layer in storyboard.Layers) { if (layer.Name != "Fail") layer.Elements = Beatmap.Storyboard.GetLayer(layer.Name).Elements.Where(e => !(e is StoryboardSampleInfo)).ToList(); } + if (!storyboard.HasDrawable) + return; + if (storyboard.ReplacesBackground) { Sprite.Texture = Texture.WhitePixel;