1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

Allow gameplayClock to be null

This commit is contained in:
Poyo 2023-11-12 13:29:40 -08:00
parent e67725f5d6
commit f794d4dc83

View File

@ -154,8 +154,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
[Resolved(CanBeNull = true)]
private IPooledHitObjectProvider pooledObjectProvider { get; set; }
[Resolved]
private IGameplayClock gameplayClock { get; set; } = null!;
[Resolved(CanBeNull = true)]
private IGameplayClock gameplayClock { get; set; }
/// <summary>
/// Whether the initialization logic in <see cref="Playfield" /> has applied.
@ -707,7 +707,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
}
Result.RawTime = Time.Current;
Result.GameplayRate = gameplayClock.GetTrueGameplayRate();
Result.GameplayRate = gameplayClock?.GetTrueGameplayRate() ?? 1.0;
if (Result.HasResult)
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);