mirror of
https://github.com/ppy/osu
synced 2025-03-22 02:47:04 +00:00
Merge pull request #5734 from smoogipoo/non-frame-stable-editor
Disable frame-stable playback in the editor Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
commit
8258c4a80a
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -57,7 +58,12 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
this.drawableRuleset = drawableRuleset;
|
this.drawableRuleset = drawableRuleset;
|
||||||
|
|
||||||
InternalChild = drawableRuleset;
|
InternalChild = drawableRuleset;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
drawableRuleset.FrameStablePlayback = false;
|
||||||
Playfield.DisplayJudgements.Value = false;
|
Playfield.DisplayJudgements.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,15 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
public override GameplayClock FrameStableClock => frameStabilityContainer.GameplayClock;
|
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>
|
/// <summary>
|
||||||
/// Invoked when a <see cref="JudgementResult"/> has been applied by a <see cref="DrawableHitObject"/>.
|
/// Invoked when a <see cref="JudgementResult"/> has been applied by a <see cref="DrawableHitObject"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -24,6 +24,11 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int MaxCatchUpFrames { get; set; } = 5;
|
public int MaxCatchUpFrames { get; set; } = 5;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to enable frame-stable playback.
|
||||||
|
/// </summary>
|
||||||
|
internal bool FrameStablePlayback = true;
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
public GameplayClock GameplayClock { get; }
|
public GameplayClock GameplayClock { get; }
|
||||||
|
|
||||||
@ -113,7 +118,13 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (firstConsumption)
|
if (!FrameStablePlayback)
|
||||||
|
{
|
||||||
|
manualClock.CurrentTime = newProposedTime;
|
||||||
|
requireMoreUpdateLoops = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (firstConsumption)
|
||||||
{
|
{
|
||||||
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
|
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
|
||||||
// Instead we perform an initial seek to the proposed time.
|
// Instead we perform an initial seek to the proposed time.
|
||||||
|
Loading…
Reference in New Issue
Block a user