1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Fix missing GameplayClock in some tests

This commit is contained in:
Dean Herbert 2020-09-21 22:30:14 +09:00
parent 508278505f
commit 25bf160d94

View File

@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private bool rotationTransferred;
[Resolved]
[Resolved(canBeNull: true)]
private GameplayClock gameplayClock { get; set; }
protected override void Update()
@ -131,7 +131,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
currentRotation += angle;
// rate has to be applied each frame, because it's not guaranteed to be constant throughout playback
// (see: ModTimeRamp)
RateAdjustedRotation += (float)(Math.Abs(angle) * gameplayClock.TrueGameplayRate);
RateAdjustedRotation += (float)(Math.Abs(angle) * (gameplayClock?.TrueGameplayRate ?? Clock.Rate));
}
}
}