mirror of
https://github.com/ppy/osu.git
synced 2025-02-24 16:42:58 +08:00
Change condition in Player
This commit is contained in:
parent
2a7124c341
commit
d95db4089b
@ -244,6 +244,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
HealthProcessor = gameplayMods.OfType<IApplicableHealthProcessor>().FirstOrDefault()?.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime);
|
||||
HealthProcessor ??= ruleset.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime);
|
||||
HealthProcessor.Mods.Value = gameplayMods;
|
||||
HealthProcessor.ApplyBeatmap(playableBeatmap);
|
||||
|
||||
dependencies.CacheAs(HealthProcessor);
|
||||
@ -955,7 +956,7 @@ namespace osu.Game.Screens.Play
|
||||
ScoreProcessor.FailScore(Score.ScoreInfo);
|
||||
OnFail();
|
||||
|
||||
if (HealthProcessor.FailTriggers.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
||||
if (HealthProcessor.TriggeringMod is IApplicableFailOverride mod && mod.RestartOnFail)
|
||||
Restart(true);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user