mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class. The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction. Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end. This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used. The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit. I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits. This commit fixes #6150.
This commit is contained in:
@ -83,7 +83,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
waitForPlayer();
|
||||
AddAssert("ensure frames arrived", () => replayHandler.HasFrames);
|
||||
|
||||
AddUntilStep("wait for frame starvation", () => replayHandler.NextFrame == null);
|
||||
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingNextFrame);
|
||||
checkPaused(true);
|
||||
|
||||
double? pausedTime = null;
|
||||
@ -92,7 +92,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
sendFrames();
|
||||
|
||||
AddUntilStep("wait for frame starvation", () => replayHandler.NextFrame == null);
|
||||
AddUntilStep("wait for frame starvation", () => replayHandler.WaitingNextFrame);
|
||||
checkPaused(true);
|
||||
|
||||
AddAssert("time advanced", () => currentFrameStableTime > pausedTime);
|
||||
|
Reference in New Issue
Block a user