1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 08:07:40 +08:00

Merge pull request #1402 from odgaard/bugfix-nofail-scoreprocessor

Fix playing a map with NoFail mod never completing
This commit is contained in:
Dean Herbert 2017-10-24 16:29:32 +09:00 committed by GitHub
commit 65d1594be8
2 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
/// <summary>
/// Taiko fails at the end of the map if the player has not half-filled their HP bar.
/// </summary>
public override bool HasFailed => Hits == MaxHits && Health.Value <= 0.5;
protected override bool FailCondition => Hits == MaxHits && Health.Value <= 0.5;
private double hpIncreaseTick;
private double hpIncreaseGreat;

View File

@ -66,15 +66,15 @@ namespace osu.Game.Rulesets.Scoring
/// </summary>
protected virtual bool HasCompleted => false;
/// <summary>
/// Whether the score is in a failed state.
/// </summary>
public virtual bool HasFailed => Health.Value == Health.MinValue;
/// <summary>
/// Whether this ScoreProcessor has already triggered the failed state.
/// </summary>
private bool alreadyFailed;
public virtual bool HasFailed { get; private set; }
/// <summary>
/// The conditions for failing.
/// </summary>
protected virtual bool FailCondition => Health.Value == Health.MinValue;
protected ScoreProcessor()
{
@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Scoring
Rank.Value = ScoreRank.X;
HighestCombo.Value = 0;
alreadyFailed = false;
HasFailed = false;
}
/// <summary>
@ -121,11 +121,11 @@ namespace osu.Game.Rulesets.Scoring
/// </summary>
protected void UpdateFailed()
{
if (alreadyFailed || !HasFailed)
if (HasFailed || !FailCondition)
return;
if (Failed?.Invoke() != false)
alreadyFailed = true;
HasFailed = true;
}
/// <summary>