mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:07:25 +08:00
Use IsCurrentScreen instead of a bool for both checks now.
This commit is contained in:
parent
964c6da9a4
commit
530e0afa2c
@ -88,8 +88,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private bool loadedSuccessfully => RulesetContainer?.Objects.Any() == true;
|
||||
|
||||
private bool allowRestart = true;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuConfigManager config, APIAccess api)
|
||||
{
|
||||
@ -210,7 +208,7 @@ namespace osu.Game.Screens.Play
|
||||
new HotkeyRetryOverlay
|
||||
{
|
||||
Action = () => {
|
||||
if (allowRestart) {
|
||||
if (IsCurrentScreen) {
|
||||
//we want to hide the hitrenderer immediately (looks better).
|
||||
//we may be able to remove this once the mouse cursor trail is improved.
|
||||
RulesetContainer?.Hide();
|
||||
@ -294,8 +292,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
if (IsCurrentScreen)
|
||||
{
|
||||
allowRestart = false;
|
||||
|
||||
var score = new Score
|
||||
{
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
|
Loading…
Reference in New Issue
Block a user