From f5e1734de9c37b1ea9fc8aac79bdf662e5503da0 Mon Sep 17 00:00:00 2001 From: Poyo Date: Tue, 14 Nov 2023 13:51:55 -0800 Subject: [PATCH] Use soft-cast to access IGameplayClock --- osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index 7cfb6aedf0..5abca168ed 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -154,9 +154,6 @@ namespace osu.Game.Rulesets.Objects.Drawables [Resolved(CanBeNull = true)] private IPooledHitObjectProvider pooledObjectProvider { get; set; } - [Resolved(CanBeNull = true)] - private IGameplayClock gameplayClock { get; set; } - /// /// Whether the initialization logic in has applied. /// @@ -707,7 +704,7 @@ namespace osu.Game.Rulesets.Objects.Drawables } Result.RawTime = Time.Current; - Result.GameplayRate = gameplayClock?.GetTrueGameplayRate() ?? 1.0; + Result.GameplayRate = (Clock as IGameplayClock)?.GetTrueGameplayRate() ?? 1.0; if (Result.HasResult) updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);