mirror of
https://github.com/ppy/osu
synced 2024-12-13 10:28:17 +00:00
Reduce nesting, because we don't have partial judgements any more
This commit is contained in:
parent
c07e831b17
commit
cba642f781
@ -169,31 +169,26 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// <param name="judgement">The judgement to add.</param>
|
||||
protected void AddJudgement(Judgement judgement)
|
||||
{
|
||||
bool exists = Judgements.Contains(judgement);
|
||||
|
||||
if (!exists)
|
||||
if (judgement.AffectsCombo)
|
||||
{
|
||||
if (judgement.AffectsCombo)
|
||||
switch (judgement.Result)
|
||||
{
|
||||
switch (judgement.Result)
|
||||
{
|
||||
case HitResult.None:
|
||||
break;
|
||||
case HitResult.Miss:
|
||||
Combo.Value = 0;
|
||||
break;
|
||||
default:
|
||||
Combo.Value++;
|
||||
break;
|
||||
}
|
||||
case HitResult.None:
|
||||
break;
|
||||
case HitResult.Miss:
|
||||
Combo.Value = 0;
|
||||
break;
|
||||
default:
|
||||
Combo.Value++;
|
||||
break;
|
||||
}
|
||||
|
||||
Judgements.Add(judgement);
|
||||
OnNewJudgement(judgement);
|
||||
|
||||
NotifyNewJudgement(judgement);
|
||||
}
|
||||
|
||||
Judgements.Add(judgement);
|
||||
OnNewJudgement(judgement);
|
||||
|
||||
NotifyNewJudgement(judgement);
|
||||
|
||||
UpdateFailed();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user