From 4fa038aa27fcde705f2f53ae2bfb8b71026df15b Mon Sep 17 00:00:00 2001 From: james58899 Date: Thu, 11 Jan 2018 13:53:41 +0800 Subject: [PATCH] if not storyboard file --- osu.Game/Beatmaps/BeatmapManager.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index c34ea13eda..d342e495e2 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -691,14 +691,19 @@ namespace osu.Game.Beatmaps protected override Storyboard GetStoryboard() { - if (BeatmapInfo?.Path == null && BeatmapSetInfo?.StoryboardFile == null) - return new Storyboard(); - try { - using (var beatmap = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo?.Path)))) - using (var storyboard = new StreamReader(store.GetStream(getPathForFile(BeatmapSetInfo.StoryboardFile)))) - return Decoder.GetDecoder(beatmap).GetStoryboardDecoder().DecodeStoryboard(beatmap, storyboard); + + using (var beatmap = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo.Path)))) + { + Decoder decoder = Decoder.GetDecoder(beatmap); + + if (BeatmapSetInfo?.StoryboardFile == null) + return decoder.GetStoryboardDecoder().DecodeStoryboard(beatmap); + + using (var storyboard = new StreamReader(store.GetStream(getPathForFile(BeatmapSetInfo.StoryboardFile)))) + return decoder.GetStoryboardDecoder().DecodeStoryboard(beatmap, storyboard); + } } catch {