1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 08:32:54 +08:00

Fix rate adjustments changing the spacing between replay frames

This commit is contained in:
Dean Herbert 2025-01-09 13:24:27 +09:00
parent 2a7a3d932e
commit c8f72fdbe9
No known key found for this signature in database

View File

@ -27,7 +27,10 @@ namespace osu.Game.Rulesets.UI
private InputManager inputManager;
public int RecordFrameRate = 60;
/// <summary>
/// The frame rate to record replays at.
/// </summary>
public int RecordFrameRate { get; set; } = 60;
[Resolved]
private SpectatorClient spectatorClient { get; set; }
@ -76,7 +79,7 @@ namespace osu.Game.Rulesets.UI
{
var last = target.Replay.Frames.LastOrDefault();
if (!important && last != null && Time.Current - last.Time < (1000d / RecordFrameRate))
if (!important && last != null && Time.Current - last.Time < (1000d / RecordFrameRate) * Clock.Rate)
return;
var position = ScreenSpaceToGamefield?.Invoke(inputManager.CurrentState.Mouse.Position) ?? inputManager.CurrentState.Mouse.Position;