1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

if not storyboard file

This commit is contained in:
james58899 2018-01-11 13:53:41 +08:00
parent fbffc8bb89
commit 4fa038aa27
No known key found for this signature in database
GPG Key ID: 7F83E3A11DD5192E

View File

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