From 6bfac9f8e42546565c34151b0d30d0c5b501bd74 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 31 Jul 2019 17:50:13 +0900 Subject: [PATCH 1/2] Remove protected ctor --- osu.Game/Rulesets/Scoring/ScoreProcessor.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index 47ce28db4c..b3d7bfb91f 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -217,10 +217,6 @@ namespace osu.Game.Rulesets.Scoring private double baseScore; private double bonusScore; - protected ScoreProcessor() - { - } - public ScoreProcessor(DrawableRuleset drawableRuleset) { Debug.Assert(base_portion + combo_portion == 1.0); From e57663b39cdf2ba57984f54c6dd54a751ac225e7 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 31 Jul 2019 17:55:22 +0900 Subject: [PATCH 2/2] Apply mod score multipliers --- osu.Game/Rulesets/Scoring/ScoreProcessor.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index b3d7bfb91f..2e863f7edb 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -217,6 +217,8 @@ namespace osu.Game.Rulesets.Scoring private double baseScore; private double bonusScore; + private double scoreMultiplier = 1; + public ScoreProcessor(DrawableRuleset drawableRuleset) { Debug.Assert(base_portion + combo_portion == 1.0); @@ -235,6 +237,15 @@ namespace osu.Game.Rulesets.Scoring } Mode.ValueChanged += _ => updateScore(); + Mods.ValueChanged += mods => + { + scoreMultiplier = 1; + + foreach (var m in mods.NewValue) + scoreMultiplier *= m.ScoreMultiplier; + + updateScore(); + }; } /// @@ -384,7 +395,7 @@ namespace osu.Game.Rulesets.Scoring if (rollingMaxBaseScore != 0) Accuracy.Value = baseScore / rollingMaxBaseScore; - TotalScore.Value = getScore(Mode.Value); + TotalScore.Value = getScore(Mode.Value) * scoreMultiplier; } private double getScore(ScoringMode mode)