Reduce nesting, because we don't have partial judgements any more

This commit is contained in:
smoogipooo 2017-09-12 19:45:07 +09:00
parent c07e831b17
commit cba642f781

View File

@ -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();
}