mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Remove local "next frame" storage
This commit is contained in:
@ -41,8 +41,6 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Resolved]
|
||||
private OsuGameBase game { get; set; }
|
||||
|
||||
private int nextFrame;
|
||||
|
||||
private BeatmapSetInfo importedBeatmap;
|
||||
|
||||
private int importedBeatmapId;
|
||||
@ -51,8 +49,6 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
base.SetUpSteps();
|
||||
|
||||
AddStep("reset sent frames", () => nextFrame = 0);
|
||||
|
||||
AddStep("import beatmap", () =>
|
||||
{
|
||||
importedBeatmap = ImportBeatmapTest.LoadOszIntoOsu(game, virtualTrack: true).Result;
|
||||
@ -105,7 +101,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
waitForPlayer();
|
||||
checkPaused(true);
|
||||
|
||||
sendFrames(1000); // send enough frames to ensure play won't be paused
|
||||
// send enough frames to ensure play won't be paused
|
||||
sendFrames(100);
|
||||
|
||||
checkPaused(false);
|
||||
}
|
||||
@ -114,12 +111,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
public void TestSpectatingDuringGameplay()
|
||||
{
|
||||
start();
|
||||
sendFrames(300);
|
||||
|
||||
loadSpectatingScreen();
|
||||
waitForPlayer();
|
||||
|
||||
AddStep("advance frame count", () => nextFrame = 300);
|
||||
sendFrames();
|
||||
sendFrames(300);
|
||||
|
||||
AddUntilStep("playing from correct point in time", () => player.ChildrenOfType<DrawableRuleset>().First().FrameStableClock.CurrentTime > 30000);
|
||||
}
|
||||
@ -220,11 +217,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
private void sendFrames(int count = 10)
|
||||
{
|
||||
AddStep("send frames", () =>
|
||||
{
|
||||
testSpectatorClient.SendFrames(streamingUser.Id, nextFrame, count);
|
||||
nextFrame += count;
|
||||
});
|
||||
AddStep("send frames", () => testSpectatorClient.SendFrames(streamingUser.Id, count));
|
||||
}
|
||||
|
||||
private void loadSpectatingScreen()
|
||||
|
Reference in New Issue
Block a user