readd storyboard to beatmap + minor cleanup

This commit is contained in:
Aergwyn
2017-11-30 16:49:53 +01:00
parent 96f5bd3323
commit 016057ab01
3 changed files with 13 additions and 14 deletions

View File

@ -569,16 +569,11 @@ namespace osu.Game.Beatmaps
{
try
{
Beatmap beatmap;
BeatmapDecoder decoder;
using (var stream = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo.Path))))
{
decoder = BeatmapDecoder.GetDecoder(stream);
beatmap = decoder.Decode(stream);
BeatmapDecoder decoder = BeatmapDecoder.GetDecoder(stream);
return decoder.Decode(stream);
}
return beatmap;
}
catch
{
@ -622,9 +617,7 @@ namespace osu.Game.Beatmaps
{
try
{
Beatmap beatmap = Beatmap;
if (beatmap == null || BeatmapSetInfo.StoryboardFile == null)
if (Beatmap == null || BeatmapSetInfo.StoryboardFile == null)
return new Storyboard();
BeatmapDecoder decoder;
@ -632,9 +625,9 @@ namespace osu.Game.Beatmaps
decoder = BeatmapDecoder.GetDecoder(stream);
using (var stream = new StreamReader(store.GetStream(getPathForFile(BeatmapSetInfo.StoryboardFile))))
decoder.Decode(stream, beatmap);
decoder.Decode(stream, Beatmap);
return beatmap.Storyboard;
return Beatmap.Storyboard;
}
catch
{