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

Combine methods

This commit is contained in:
smoogipoo 2021-06-10 21:39:13 +09:00
parent 5073ede115
commit e18f4cd4ba

View File

@ -63,6 +63,8 @@ namespace osu.Game.Screens.Play
if (!this.IsCurrentScreen())
return;
bool isFirstBundle = score.Replay.Frames.Count == 0;
foreach (var frame in bundle.Frames)
{
IConvertibleReplayFrame convertibleFrame = GameplayRuleset.CreateConvertibleReplayFrame();
@ -74,19 +76,8 @@ namespace osu.Game.Screens.Play
score.Replay.Frames.Add(convertedFrame);
}
seekToGameplay();
}
private bool seekedToGameplay;
private void seekToGameplay()
{
if (seekedToGameplay || score.Replay.Frames.Count == 0)
return;
NonFrameStableSeek(score.Replay.Frames[0].Time);
seekedToGameplay = true;
if (isFirstBundle && score.Replay.Frames.Count > 0)
NonFrameStableSeek(score.Replay.Frames[0].Time);
}
protected override Score CreateScore() => score;