mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 19:12:57 +08:00
Fix online play screen only accounting for current sub screen onexiting blocks
This commit is contained in:
parent
320c4abb66
commit
1dbb2a4d37
@ -147,9 +147,14 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
public override bool OnExiting(ScreenExitEvent e)
|
||||
{
|
||||
var subScreen = screenStack.CurrentScreen as Drawable;
|
||||
if (subScreen?.IsLoaded == true && screenStack.CurrentScreen.OnExiting(e))
|
||||
return true;
|
||||
while (screenStack.CurrentScreen is not LoungeSubScreen)
|
||||
{
|
||||
var lastSubScreen = screenStack.CurrentScreen;
|
||||
if (((Drawable)lastSubScreen)?.IsLoaded == true)
|
||||
screenStack.Exit();
|
||||
|
||||
if (lastSubScreen == screenStack.CurrentScreen) return true;
|
||||
}
|
||||
|
||||
RoomManager.PartRoom();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user