mirror of
https://github.com/ppy/osu
synced 2025-04-11 03:31:46 +00: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.BaseStream.Position = 0;
|
||||||
stream.DiscardBufferedData();
|
stream.DiscardBufferedData();
|
||||||
|
|
||||||
string fullText = stream.ReadToEnd();
|
try
|
||||||
fullText.DeserializeInto(beatmap);
|
{
|
||||||
|
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)
|
foreach (var hitObject in beatmap.HitObjects)
|
||||||
hitObject.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);
|
hitObject.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);
|
||||||
|
Loading…
Reference in New Issue
Block a user