diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
index 9d1088f69d..5a9ff592bc 100644
--- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
+++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
@@ -224,12 +224,12 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
}
var result = HitObject.HitWindows.ResultFor(timeOffset);
- if (result == null)
+ if (result == HitResult.None)
return;
AddJudgement(new HoldNoteTailJudgement
{
- Result = result.Value,
+ Result = result,
HasBroken = holdNote.hasBroken
});
}
diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs
index a9a0741370..8944978bdd 100644
--- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs
+++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs
@@ -68,10 +68,10 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
}
var result = HitObject.HitWindows.ResultFor(timeOffset);
- if (result == null)
+ if (result == HitResult.None)
return;
- AddJudgement(new ManiaJudgement { Result = result.Value });
+ AddJudgement(new ManiaJudgement { Result = result });
}
protected override void UpdateState(ArmedState state)
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
index 41f50844ed..959c87bbba 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs
@@ -78,12 +78,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
}
var result = HitObject.HitWindows.ResultFor(timeOffset);
- if (result == null)
+ if (result == HitResult.None)
return;
AddJudgement(new OsuJudgement
{
- Result = result.Value,
+ Result = result,
PositionOffset = Vector2.Zero //todo: set to correct value
});
}
diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs
index bf327cb491..63e6cfb297 100644
--- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs
+++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs
@@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
}
var result = HitObject.HitWindows.ResultFor(timeOffset);
- if (result == null)
+ if (result == HitResult.None)
return;
if (!validKeyPressed || result == HitResult.Miss)
@@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
AddJudgement(new TaikoJudgement
{
- Result = result.Value,
+ Result = result,
Final = !HitObject.IsStrong
});
diff --git a/osu.Game/Rulesets/Objects/HitWindows.cs b/osu.Game/Rulesets/Objects/HitWindows.cs
index e2f95f2cf2..0ec8389b4f 100644
--- a/osu.Game/Rulesets/Objects/HitWindows.cs
+++ b/osu.Game/Rulesets/Objects/HitWindows.cs
@@ -80,8 +80,8 @@ namespace osu.Game.Rulesets.Objects
/// Retrieves the for a time offset.
///
/// The time offset.
- /// The hit result, or null if doesn't result in a judgement.
- public HitResult? ResultFor(double timeOffset)
+ /// The hit result, or if doesn't result in a judgement.
+ public HitResult ResultFor(double timeOffset)
{
timeOffset = Math.Abs(timeOffset);
@@ -98,7 +98,7 @@ namespace osu.Game.Rulesets.Objects
if (timeOffset <= HalfWindowFor(HitResult.Miss))
return HitResult.Miss;
- return null;
+ return HitResult.None;
}
///