mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 10:17:19 +08:00
Seek to the least most-recent frame instead
This commit is contained in:
parent
263b8ff097
commit
59eda70c12
@ -133,11 +133,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
|
|
||||||
private void onReadyToStart()
|
private void onReadyToStart()
|
||||||
{
|
{
|
||||||
|
// Seek the master clock to the gameplay time.
|
||||||
|
// This is chosen as the first available frame in the players' replays, which matches the seek by each individual SpectatorPlayer.
|
||||||
var startTime = instances.Where(i => i.Score != null)
|
var startTime = instances.Where(i => i.Score != null)
|
||||||
.SelectMany(i => i.Score.Replay.Frames)
|
.SelectMany(i => i.Score.Replay.Frames)
|
||||||
.Select(f => f.Time)
|
.Select(f => f.Time)
|
||||||
.DefaultIfEmpty(0)
|
.DefaultIfEmpty(0)
|
||||||
.Max();
|
.Min();
|
||||||
|
|
||||||
masterClockContainer.Seek(startTime);
|
masterClockContainer.Seek(startTime);
|
||||||
masterClockContainer.Start();
|
masterClockContainer.Start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user