From 87ad44b9015cfbe33c724d1ab1028b4d19c0872e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Dec 2016 18:18:36 +0900 Subject: [PATCH] Fix HitObject test case not displaying properly. --- osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs | 4 +++- osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index 1e18ae4117..3c58ef207e 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -22,7 +22,7 @@ namespace osu.Desktop.VisualTests.Tests public TestCaseHitObjects() { - var swClock = new StopwatchClock(true) { Rate = 1 }; + var swClock = new StopwatchClock(true) { Rate = 0.2f }; Clock = new FramedClock(swClock); } @@ -52,8 +52,10 @@ namespace osu.Desktop.VisualTests.Tests Origin = Anchor.Centre, Depth = i, State = ArmedState.Hit, + Judgement = new OsuJudgementInfo { Result = HitResult.Hit } }; + approachContainer.Add(d.ApproachCircle.CreateProxy()); Add(d); } diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 352615eeab..9b5c268696 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -47,7 +47,9 @@ namespace osu.Game.Modes.Objects.Drawables { base.LoadComplete(); - Judgement = CreateJudgementInfo(); + //we may be setting a custom judgement in test cases or what not. + if (Judgement == null) + Judgement = CreateJudgementInfo(); //force application of the state that was set before we loaded. UpdateState(State);