mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 06:47:46 +08:00
Don't play player exit sound when restarting
This commit is contained in:
parent
713cff3403
commit
be2b4e68b9
@ -53,6 +53,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public override bool AllowBackButton => false; // handled by HoldForMenuButton
|
||||
|
||||
protected override bool PlayExitSound => !isRestarting;
|
||||
|
||||
protected override UserActivity InitialActivity => new UserActivity.InSoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
@ -75,6 +77,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public Action RestartRequested;
|
||||
|
||||
private bool isRestarting;
|
||||
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
|
||||
private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>();
|
||||
@ -643,6 +647,8 @@ namespace osu.Game.Screens.Play
|
||||
if (!Configuration.AllowRestart)
|
||||
return;
|
||||
|
||||
isRestarting = true;
|
||||
|
||||
// at the point of restarting the track should either already be paused or the volume should be zero.
|
||||
// stopping here is to ensure music doesn't become audible after exiting back to PlayerLoader.
|
||||
musicController.Stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user