mirror of
https://github.com/ppy/osu
synced 2025-01-02 04:12:13 +00:00
Disable frame-stable playback in the editor
This commit is contained in:
parent
918701be44
commit
8c67f58e2d
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -57,7 +58,12 @@ namespace osu.Game.Rulesets.Edit
|
||||
this.drawableRuleset = drawableRuleset;
|
||||
|
||||
InternalChild = drawableRuleset;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
drawableRuleset.FrameStablePlayback = false;
|
||||
Playfield.DisplayJudgements.Value = false;
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,15 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public override GameplayClock FrameStableClock => frameStabilityContainer.GameplayClock;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable frame-stable playback.
|
||||
/// </summary>
|
||||
internal bool FrameStablePlayback
|
||||
{
|
||||
get => frameStabilityContainer.FrameStablePlayback;
|
||||
set => frameStabilityContainer.FrameStablePlayback = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a <see cref="JudgementResult"/> has been applied by a <see cref="DrawableHitObject"/>.
|
||||
/// </summary>
|
||||
|
@ -24,6 +24,11 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </summary>
|
||||
public int MaxCatchUpFrames { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable frame-stable playback.
|
||||
/// </summary>
|
||||
internal bool FrameStablePlayback = true;
|
||||
|
||||
[Cached]
|
||||
public GameplayClock GameplayClock { get; }
|
||||
|
||||
@ -113,6 +118,9 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
try
|
||||
{
|
||||
if (!FrameStablePlayback)
|
||||
manualClock.CurrentTime = newProposedTime;
|
||||
|
||||
if (firstConsumption)
|
||||
{
|
||||
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
|
||||
|
Loading…
Reference in New Issue
Block a user