diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
index 62149620d2..cf6011d721 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
@@ -57,7 +57,36 @@ namespace osu.Game.Rulesets.Catch.Tests
});
[Test]
- public void TestCatcherStateRevert()
+ public void TestCatcherHyperStateReverted()
+ {
+ DrawableCatchHitObject drawableObject1 = null;
+ DrawableCatchHitObject drawableObject2 = null;
+ JudgementResult result1 = null;
+ JudgementResult result2 = null;
+ AddStep("catch hyper fruit", () =>
+ {
+ drawableObject1 = createDrawableObject(new Fruit { HyperDashTarget = new Fruit { X = 100 } });
+ result1 = attemptCatch(drawableObject1);
+ });
+ AddStep("catch normal fruit", () =>
+ {
+ drawableObject2 = createDrawableObject(new Fruit());
+ result2 = attemptCatch(drawableObject2);
+ });
+ AddStep("revert second result", () =>
+ {
+ catcher.OnRevertResult(drawableObject2, result2);
+ });
+ checkHyperDash(true);
+ AddStep("revert first result", () =>
+ {
+ catcher.OnRevertResult(drawableObject1, result1);
+ });
+ checkHyperDash(false);
+ }
+
+ [Test]
+ public void TestCatcherAnimationStateReverted()
{
DrawableCatchHitObject drawableObject = null;
JudgementResult result = null;
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs b/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
index 4b375e641b..c09355d59c 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
@@ -15,6 +15,11 @@ namespace osu.Game.Rulesets.Catch.Judgements
///
public CatcherAnimationState CatcherAnimationState;
+ ///
+ /// Whether the catcher was hyper dashing prior to this judgement.
+ ///
+ public bool CatcherHyperDash;
+
public CatchJudgementResult([NotNull] HitObject hitObject, [NotNull] Judgement judgement)
: base(hitObject, judgement)
{
diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs
index 33068f95eb..da80fa2bd5 100644
--- a/osu.Game.Rulesets.Catch/UI/Catcher.cs
+++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs
@@ -213,6 +213,7 @@ namespace osu.Game.Rulesets.Catch.UI
{
var catchResult = (CatchJudgementResult)result;
catchResult.CatcherAnimationState = CurrentState;
+ catchResult.CatcherHyperDash = HyperDashing;
if (!(drawableObject.HitObject is PalpableCatchHitObject hitObject)) return;
@@ -243,7 +244,17 @@ namespace osu.Game.Rulesets.Catch.UI
public void OnRevertResult(DrawableCatchHitObject fruit, JudgementResult result)
{
var catchResult = (CatchJudgementResult)result;
- updateState(catchResult.CatcherAnimationState);
+
+ if (CurrentState != catchResult.CatcherAnimationState)
+ updateState(catchResult.CatcherAnimationState);
+
+ if (HyperDashing != catchResult.CatcherHyperDash)
+ {
+ if (catchResult.CatcherHyperDash)
+ SetHyperDashState(2);
+ else
+ SetHyperDashState();
+ }
}
///