mirror of https://github.com/ppy/osu
Don't play player exit sound when restarting
This commit is contained in:
parent
713cff3403
commit
be2b4e68b9
|
@ -53,6 +53,8 @@ public abstract class Player : ScreenWithBeatmapBackground, ISamplePlaybackDisab
|
|||
|
||||
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 @@ public abstract class Player : ScreenWithBeatmapBackground, ISamplePlaybackDisab
|
|||
|
||||
public Action RestartRequested;
|
||||
|
||||
private bool isRestarting;
|
||||
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
|
||||
private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>();
|
||||
|
@ -643,6 +647,8 @@ public void Restart()
|
|||
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…
Reference in New Issue