diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index e60ca70969..c37b5d189f 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -95,24 +95,29 @@ namespace osu.Game.Rulesets.Scoring /// protected virtual bool DefaultFailCondition => Health.Value == Health.MinValue; + private bool adjustRank = false; + /// /// Used by specific mods to adjust . /// - public BindableBool AdjustRank = new BindableBool(); + public bool AdjustRank + { + get { return adjustRank; } + set { adjustRank = value; Rank.Value = rankFrom(Accuracy.Value); } // Update rank immediately if AdjustRank was changed + } protected ScoreProcessor() { Combo.ValueChanged += delegate { HighestCombo.Value = Math.Max(HighestCombo.Value, Combo.Value); }; Accuracy.ValueChanged += delegate { Rank.Value = rankFrom(Accuracy.Value); }; - AdjustRank.ValueChanged += delegate { Rank.Value = rankFrom(Accuracy.Value); }; // Update rank immediately if AdjustRank was changed } private ScoreRank rankFrom(double acc) { if (acc == 1) - return (AdjustRank.Value ? ScoreRank.XH : ScoreRank.X); + return (adjustRank ? ScoreRank.XH : ScoreRank.X); if (acc > 0.95) - return (AdjustRank.Value ? ScoreRank.SH : ScoreRank.S); + return (adjustRank ? ScoreRank.SH : ScoreRank.S); if (acc > 0.9) return ScoreRank.A; if (acc > 0.8) @@ -129,7 +134,6 @@ namespace osu.Game.Rulesets.Scoring /// Whether to store the current state of the for future use. protected virtual void Reset(bool storeResults) { - AdjustRank.Value = false; TotalScore.Value = 0; Accuracy.Value = 1; Health.Value = 1; @@ -137,6 +141,7 @@ namespace osu.Game.Rulesets.Scoring Rank.Value = ScoreRank.X; HighestCombo.Value = 0; + AdjustRank = false; HasFailed = false; }