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:
parent
a8db3a9484
commit
0e3b001b13
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user