mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 04:23:21 +08:00
Fix rate adjustments changing the spacing between replay frames
This commit is contained in:
parent
2a7a3d932e
commit
c8f72fdbe9
@ -27,7 +27,10 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
private InputManager inputManager;
|
private InputManager inputManager;
|
||||||
|
|
||||||
public int RecordFrameRate = 60;
|
/// <summary>
|
||||||
|
/// The frame rate to record replays at.
|
||||||
|
/// </summary>
|
||||||
|
public int RecordFrameRate { get; set; } = 60;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private SpectatorClient spectatorClient { get; set; }
|
private SpectatorClient spectatorClient { get; set; }
|
||||||
@ -76,7 +79,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
var last = target.Replay.Frames.LastOrDefault();
|
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;
|
return;
|
||||||
|
|
||||||
var position = ScreenSpaceToGamefield?.Invoke(inputManager.CurrentState.Mouse.Position) ?? inputManager.CurrentState.Mouse.Position;
|
var position = ScreenSpaceToGamefield?.Invoke(inputManager.CurrentState.Mouse.Position) ?? inputManager.CurrentState.Mouse.Position;
|
||||||
|
Loading…
Reference in New Issue
Block a user