From 54c12c281b24d825e927171efc1bb24ee8a05b85 Mon Sep 17 00:00:00 2001 From: Peter-io <93472377+Peter-io@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:40:04 +0200 Subject: [PATCH] Pass already ordered mods to HealthProcessor --- osu.Game/Rulesets/Scoring/HealthProcessor.cs | 2 +- osu.Game/Screens/Play/Player.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/HealthProcessor.cs b/osu.Game/Rulesets/Scoring/HealthProcessor.cs index dfe8398348..03d517a25a 100644 --- a/osu.Game/Rulesets/Scoring/HealthProcessor.cs +++ b/osu.Game/Rulesets/Scoring/HealthProcessor.cs @@ -102,7 +102,7 @@ namespace osu.Game.Rulesets.Scoring if (CheckDefaultFailCondition(result)) return true; - foreach (var condition in Mods.Value.OfType().OrderByDescending(m => m.RestartOnFail)) + foreach (var condition in Mods.Value.OfType()) { if (condition.FailCondition(result)) { diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 0cdcd5fb29..bf9ca1c5bd 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -244,7 +244,7 @@ namespace osu.Game.Screens.Play HealthProcessor = gameplayMods.OfType().FirstOrDefault()?.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime); HealthProcessor ??= ruleset.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime); - HealthProcessor.Mods.Value = gameplayMods; + HealthProcessor.Mods.Value = gameplayMods.OrderByDescending(m => m is IHasFailCondition mod && mod.RestartOnFail).ToArray(); HealthProcessor.ApplyBeatmap(playableBeatmap); dependencies.CacheAs(HealthProcessor);