diff --git a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs index c79938e613..d1b47b449b 100644 --- a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs @@ -62,28 +62,30 @@ protected override void ParseStreamInto(StreamReader stream, Beatmap beatmap) protected override void ParseLine(Beatmap beatmap, Section section, string line) { + var strippedLine = StripComments(line); + switch (section) { case Section.General: - handleGeneral(line); + handleGeneral(strippedLine); return; case Section.Editor: - handleEditor(line); + handleEditor(strippedLine); return; case Section.Metadata: handleMetadata(line); return; case Section.Difficulty: - handleDifficulty(line); + handleDifficulty(strippedLine); return; case Section.Events: - handleEvent(line); + handleEvent(strippedLine); return; case Section.TimingPoints: - handleTimingPoint(line); + handleTimingPoint(strippedLine); return; case Section.HitObjects: - handleHitObject(line); + handleHitObject(strippedLine); return; } diff --git a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs index c8874c3bc7..91c1c98438 100644 --- a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs @@ -57,6 +57,8 @@ protected override void ParseStreamInto(StreamReader stream, T output) protected virtual void ParseLine(T output, Section section, string line) { + line = StripComments(line); + switch (section) { case Section.Colours: @@ -65,6 +67,14 @@ protected virtual void ParseLine(T output, Section section, string line) } } + protected string StripComments(string line) + { + var index = line.IndexOf("//", StringComparison.Ordinal); + if (index > 0) + return line.Substring(0, index); + return line; + } + private bool hasComboColours; private void handleColours(T output, string line) diff --git a/osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs index 868ae5206a..b418cbd5ec 100644 --- a/osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyStoryboardDecoder.cs @@ -42,6 +42,8 @@ protected override void ParseStreamInto(StreamReader stream, Storyboard storyboa protected override void ParseLine(Storyboard storyboard, Section section, string line) { + line = StripComments(line); + switch (section) { case Section.Events: diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index d8b714529b..49a180902b 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -219,9 +219,7 @@ private void load(AudioManager audio, APIAccess api, OsuConfigManager config) { if (!IsCurrentScreen) return; - //we want to hide the hitrenderer immediately (looks better). - //we may be able to remove this once the mouse cursor trail is improved. - RulesetContainer?.Hide(); + pauseContainer.Hide(); Restart(); }, } diff --git a/osu.Game/Skinning/LegacySkinDecoder.cs b/osu.Game/Skinning/LegacySkinDecoder.cs index 0ef54c7310..d4f1c5c6f1 100644 --- a/osu.Game/Skinning/LegacySkinDecoder.cs +++ b/osu.Game/Skinning/LegacySkinDecoder.cs @@ -14,6 +14,8 @@ public LegacySkinDecoder() protected override void ParseLine(SkinConfiguration skin, Section section, string line) { + line = StripComments(line); + switch (section) { case Section.General: