From a06c195e1f9a4418c67d3b5080725ce7840d5bd1 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 13:23:39 +0900 Subject: [PATCH] Add reading of KiaiMode/OmitFirstBarLine from legacy control points. --- osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 4 +++- osu.Game/Beatmaps/Timing/ControlPoint.cs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index e7ede36b4b..efdcea4b41 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -197,7 +197,7 @@ namespace osu.Game.Beatmaps.Formats if (split.Length > 2) { - //int kiaiFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0; + int effectFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0; double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo); cp = new ControlPoint { @@ -205,6 +205,8 @@ namespace osu.Game.Beatmaps.Formats BeatLength = beatLength > 0 ? beatLength : 0, VelocityAdjustment = beatLength < 0 ? -beatLength / 100.0 : 1, TimingChange = split.Length <= 6 || split[6][0] == '1', + KiaiMode = (effectFlags & 1) > 0, + OmitFirstBarLine = (effectFlags & 8) > 0 }; } diff --git a/osu.Game/Beatmaps/Timing/ControlPoint.cs b/osu.Game/Beatmaps/Timing/ControlPoint.cs index bd53928a32..e323412f81 100644 --- a/osu.Game/Beatmaps/Timing/ControlPoint.cs +++ b/osu.Game/Beatmaps/Timing/ControlPoint.cs @@ -16,6 +16,7 @@ namespace osu.Game.Beatmaps.Timing public double VelocityAdjustment; public bool TimingChange; public bool KiaiMode; + public bool OmitFirstBarLine; }