Fix state update exception in a better way

This commit is contained in:
smoogipoo
2020-11-11 19:01:12 +09:00
parent 7d02018134
commit 606cfacedf
2 changed files with 10 additions and 5 deletions

View File

@ -613,13 +613,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// The time at which state transforms should be applied that line up to <see cref="HitObject"/>'s StartTime.
/// This is used to offset calls to <see cref="UpdateStateTransforms"/>.
/// </summary>
public double StateUpdateTime => HitObject?.StartTime ?? 0;
public double StateUpdateTime => HitObject.StartTime;
/// <summary>
/// The time at which judgement dependent state transforms should be applied. This is equivalent of the (end) time of the object, in addition to any judgement offset.
/// This is used to offset calls to <see cref="UpdateHitStateTransforms"/>.
/// </summary>
public double HitStateUpdateTime => Result?.TimeAbsolute ?? HitObject?.GetEndTime() ?? 0;
public double HitStateUpdateTime => Result?.TimeAbsolute ?? HitObject.GetEndTime();
/// <summary>
/// Will be called at least once after this <see cref="DrawableHitObject"/> has become not alive.