mirror of
https://github.com/ppy/osu.git
synced 2025-02-25 00:22:57 +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 = gameplayMods.OfType<IApplicableHealthProcessor>().FirstOrDefault()?.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime);
|
||||||
HealthProcessor ??= ruleset.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime);
|
HealthProcessor ??= ruleset.CreateHealthProcessor(playableBeatmap.HitObjects[0].StartTime);
|
||||||
|
HealthProcessor.Mods.Value = gameplayMods;
|
||||||
HealthProcessor.ApplyBeatmap(playableBeatmap);
|
HealthProcessor.ApplyBeatmap(playableBeatmap);
|
||||||
|
|
||||||
dependencies.CacheAs(HealthProcessor);
|
dependencies.CacheAs(HealthProcessor);
|
||||||
@ -955,7 +956,7 @@ namespace osu.Game.Screens.Play
|
|||||||
ScoreProcessor.FailScore(Score.ScoreInfo);
|
ScoreProcessor.FailScore(Score.ScoreInfo);
|
||||||
OnFail();
|
OnFail();
|
||||||
|
|
||||||
if (HealthProcessor.FailTriggers.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
if (HealthProcessor.TriggeringMod is IApplicableFailOverride mod && mod.RestartOnFail)
|
||||||
Restart(true);
|
Restart(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user