mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 23:27:38 +09:00
Allow failed scores to fail in replay playback
This commit is contained in:
parent
d325c534ab
commit
2beed6d7b7
@ -22,12 +22,21 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
private readonly Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore;
|
private readonly Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore;
|
||||||
|
|
||||||
|
private readonly bool replayIsFailedScore;
|
||||||
|
|
||||||
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
||||||
protected override bool CheckModsAllowFailure() => false;
|
protected override bool CheckModsAllowFailure()
|
||||||
|
{
|
||||||
|
if (!replayIsFailedScore)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.CheckModsAllowFailure();
|
||||||
|
}
|
||||||
|
|
||||||
public ReplayPlayer(Score score, PlayerConfiguration configuration = null)
|
public ReplayPlayer(Score score, PlayerConfiguration configuration = null)
|
||||||
: this((_, _) => score, configuration)
|
: this((_, _) => score, configuration)
|
||||||
{
|
{
|
||||||
|
replayIsFailedScore = score.ScoreInfo.Rank == ScoreRank.F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReplayPlayer(Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore, PlayerConfiguration configuration = null)
|
public ReplayPlayer(Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore, PlayerConfiguration configuration = null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user