Merge branch 'master' into kps

This commit is contained in:
Dean Herbert
2022-08-31 15:41:42 +09:00
134 changed files with 2993 additions and 1511 deletions

View File

@ -4,6 +4,7 @@
#nullable disable
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
@ -640,8 +641,7 @@ namespace osu.Game.Screens.Play
bool wasFrameStable = DrawableRuleset.FrameStablePlayback;
DrawableRuleset.FrameStablePlayback = false;
GameplayClockContainer.StartTime = time;
GameplayClockContainer.Reset();
GameplayClockContainer.Reset(time);
// Delay resetting frame-stable playback for one frame to give the FrameStabilityContainer a chance to seek.
frameStablePlaybackResetDelegate = ScheduleAfterChildren(() => DrawableRuleset.FrameStablePlayback = wasFrameStable);
@ -828,9 +828,17 @@ namespace osu.Game.Screens.Play
private bool onFail()
{
// Failing after the quit sequence has started may cause weird side effects with the fail animation / effects.
if (GameplayState.HasQuit)
return false;
if (!CheckModsAllowFailure())
return false;
Debug.Assert(!GameplayState.HasFailed);
Debug.Assert(!GameplayState.HasPassed);
Debug.Assert(!GameplayState.HasQuit);
GameplayState.HasFailed = true;
updateGameplayState();
@ -1012,7 +1020,7 @@ namespace osu.Game.Screens.Play
if (GameplayClockContainer.IsRunning)
throw new InvalidOperationException($"{nameof(StartGameplay)} should not be called when the gameplay clock is already running");
GameplayClockContainer.Reset(true);
GameplayClockContainer.Reset(startClock: true);
}
public override void OnSuspending(ScreenTransitionEvent e)