diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 11d3da366e..0d32532f09 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -6,7 +6,6 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Screens.Testing; using osu.Game.Beatmaps; -using osu.Game.Beatmaps.Formats; using OpenTK; using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps.IO; diff --git a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs index 053695cb26..17187323d8 100644 --- a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs +++ b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs @@ -14,9 +14,6 @@ namespace osu.Game.Modes.Osu.Beatmaps public void PostProcess(Beatmap beatmap) { - if ((beatmap.ComboColors?.Count ?? 0) == 0) - return; - int comboIndex = 0; int colourIndex = 0; diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index 05334b2cd2..6dbd605359 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps { public BeatmapInfo BeatmapInfo; public List ControlPoints; - public List ComboColors = new List + public readonly List ComboColors = new List { new Color4(17, 136, 170, 255), new Color4(102, 136, 0, 255), diff --git a/osu.Game/Modes/UI/HitRenderer.cs b/osu.Game/Modes/UI/HitRenderer.cs index 63eefe7e3b..7c7349b929 100644 --- a/osu.Game/Modes/UI/HitRenderer.cs +++ b/osu.Game/Modes/UI/HitRenderer.cs @@ -11,6 +11,7 @@ using osu.Game.Modes.Objects.Drawables; using osu.Game.Screens.Play; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; namespace osu.Game.Modes.UI @@ -52,6 +53,8 @@ namespace osu.Game.Modes.UI protected HitRenderer(WorkingBeatmap beatmap) { + Debug.Assert(beatmap != null, "HitRenderer initialized with a null beatmap."); + // Convert + process the beatmap Beatmap = CreateBeatmapConverter().Convert(beatmap.Beatmap); Beatmap.HitObjects.ForEach(CreateBeatmapProcessor().SetDefaults);