1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 17:02:55 +08:00

Make maps with storyboards decode correctly with OsuJsonDecoder

This commit is contained in:
smoogipoo 2017-12-07 10:37:51 +09:00
parent a8db3a9484
commit 0e3b001b13

View File

@ -18,8 +18,16 @@ namespace osu.Game.Beatmaps.Formats
stream.BaseStream.Position = 0;
stream.DiscardBufferedData();
string fullText = stream.ReadToEnd();
fullText.DeserializeInto(beatmap);
try
{
string fullText = stream.ReadToEnd();
fullText.DeserializeInto(beatmap);
}
catch
{
// Temporary because storyboards are deserialized into beatmaps at the moment
// This try-catch shouldn't exist in the future
}
foreach (var hitObject in beatmap.HitObjects)
hitObject.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);