Skip to content

Commit

Permalink
Limit catch-up speed in test to emulate gameplay
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jan 18, 2023
1 parent 8030194 commit 5ead85f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions osu.Game.Tests/Visual/Gameplay/TestSceneSongProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning;
Expand All @@ -27,9 +28,17 @@ private void load()
{
Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);

Add(gameplayClockContainer = new MasterGameplayClockContainer(Beatmap.Value, skip_target_time));
FrameStabilityContainer frameStabilityContainer;

Dependencies.CacheAs<IGameplayClock>(gameplayClockContainer);
Add(gameplayClockContainer = new MasterGameplayClockContainer(Beatmap.Value, skip_target_time)
{
Child = frameStabilityContainer = new FrameStabilityContainer
{
MaxCatchUpFrames = 1
}
});

Dependencies.CacheAs<IGameplayClock>(frameStabilityContainer);
}

[SetUpSteps]
Expand Down

0 comments on commit 5ead85f

Please sign in to comment.