mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Pass a score to the replay recorder to allow reading more general scoring data
This commit is contained in:
@ -10,8 +10,8 @@ using osu.Framework.Input;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Online.Spectator;
|
||||
using osu.Game.Replays;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Play;
|
||||
using osuTK;
|
||||
|
||||
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.UI
|
||||
public abstract class ReplayRecorder<T> : ReplayRecorder, IKeyBindingHandler<T>
|
||||
where T : struct
|
||||
{
|
||||
private readonly Replay target;
|
||||
private readonly Score target;
|
||||
|
||||
private readonly List<T> pressedActions = new List<T>();
|
||||
|
||||
@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.UI
|
||||
[Resolved]
|
||||
private GameplayBeatmap gameplayBeatmap { get; set; }
|
||||
|
||||
protected ReplayRecorder(Replay target)
|
||||
protected ReplayRecorder(Score target)
|
||||
{
|
||||
this.target = target;
|
||||
|
||||
@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
private void recordFrame(bool important)
|
||||
{
|
||||
var last = target.Frames.LastOrDefault();
|
||||
var last = target.Replay.Frames.LastOrDefault();
|
||||
|
||||
if (!important && last != null && Time.Current - last.Time < (1000d / RecordFrameRate))
|
||||
return;
|
||||
@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
if (frame != null)
|
||||
{
|
||||
target.Frames.Add(frame);
|
||||
target.Replay.Frames.Add(frame);
|
||||
|
||||
spectatorStreaming?.HandleFrame(frame);
|
||||
}
|
||||
|
Reference in New Issue
Block a user