diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs index 873f3f8559..f7a62fe999 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs @@ -7,10 +7,8 @@ using OpenTK; using OpenTK.Graphics; using osu.Game.Beatmaps.Formats; using osu.Game.Tests.Resources; -using osu.Game.Modes.Objects.Legacy; using System.Linq; using osu.Game.Audio; -using osu.Game.Modes.Objects; using osu.Game.Modes.Objects.Types; namespace osu.Game.Tests.Beatmaps.Formats diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index 11fa4825d2..758d2205ac 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -87,7 +87,7 @@ namespace osu.Game.Beatmaps.Formats case @"Mode": beatmap.BeatmapInfo.RulesetID = int.Parse(val); - switch (beatmap.BeatmapInfo.Mode) + switch (beatmap.BeatmapInfo.RulesetID) { case 0: parser = new Modes.Objects.Legacy.Osu.HitObjectParser(); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 7c95a09e31..eea6775063 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -80,13 +80,13 @@ namespace osu.Game.Screens.Play try { // Try using the preferred user ruleset - ruleset = osu == null ? Beatmap.BeatmapInfo.Ruleset : osu.Ruleset; + ruleset = osu == null ? Beatmap.BeatmapInfo.Ruleset.CreateInstance() : osu.Ruleset.Value.CreateInstance(); HitRenderer = ruleset.CreateHitRendererWith(Beatmap); } catch (BeatmapInvalidForModeException) { // Default to the beatmap ruleset - ruleset = Beatmap.BeatmapInfo.Ruleset; + ruleset = Beatmap.BeatmapInfo.Ruleset.CreateInstance(); HitRenderer = ruleset.CreateHitRendererWith(Beatmap); } }