mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Replace object pattern match with simple conditional
This commit is contained in:
parent
1f0620ffd4
commit
2ddfd79923
@ -506,19 +506,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
|
||||
Result.TimeOffset = Math.Min(HitObject.HitWindows.WindowFor(HitResult.Miss), Time.Current - endTime);
|
||||
|
||||
switch (Result.Type)
|
||||
{
|
||||
case HitResult.None:
|
||||
break;
|
||||
|
||||
case { } result when !result.IsHit():
|
||||
updateState(ArmedState.Miss);
|
||||
break;
|
||||
|
||||
default:
|
||||
updateState(ArmedState.Hit);
|
||||
break;
|
||||
}
|
||||
if (Result.HasResult)
|
||||
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);
|
||||
|
||||
OnNewResult?.Invoke(this, Result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user