1
0
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:
Joseph Madamba 2022-08-01 07:52:07 -07:00
parent 320c4abb66
commit 1dbb2a4d37

View File

@ -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();