mirror of
https://github.com/ppy/osu.git
synced 2025-02-04 23:43:00 +08:00
Allow gameplayClock to be null
This commit is contained in:
parent
e67725f5d6
commit
f794d4dc83
@ -154,8 +154,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private IPooledHitObjectProvider pooledObjectProvider { get; set; }
|
private IPooledHitObjectProvider pooledObjectProvider { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved(CanBeNull = true)]
|
||||||
private IGameplayClock gameplayClock { get; set; } = null!;
|
private IGameplayClock gameplayClock { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the initialization logic in <see cref="Playfield" /> has applied.
|
/// 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.RawTime = Time.Current;
|
||||||
Result.GameplayRate = gameplayClock.GetTrueGameplayRate();
|
Result.GameplayRate = gameplayClock?.GetTrueGameplayRate() ?? 1.0;
|
||||||
|
|
||||||
if (Result.HasResult)
|
if (Result.HasResult)
|
||||||
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);
|
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);
|
||||||
|
Loading…
Reference in New Issue
Block a user