mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09: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…
x
Reference in New Issue
Block a user