mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:07:25 +08:00
Fix onLoadRequested
getting early-exited too early in spectator scenarios
In some scenarios, multiplayer spectator would not tick over to the next beatmap. Here's an example: - Room has two items queued - Local user starts download of both - First beatmap starts and download is complete - First beatmap ends (spectating is active) - Second beatmap starts but download is not complete In this scenario, the local client will get stuck at the spectator screen due to the `onLoadRequested`-invoked screen change being early exited. It would require manual recovery (clicking back button) to return to a sane state.
This commit is contained in:
parent
9fe9ea2c90
commit
fe47dc291b
@ -371,9 +371,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
private void onLoadRequested()
|
||||
{
|
||||
if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable)
|
||||
return;
|
||||
|
||||
// In the case of spectating, IMultiplayerClient.LoadRequested can be fired while the game is still spectating a previous session.
|
||||
// For now, we want to game to switch to the new game so need to request exiting from the play screen.
|
||||
if (!ParentScreen.IsCurrentScreen())
|
||||
@ -391,6 +388,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
if (client.LocalUser?.State == MultiplayerUserState.Spectating && (SelectedItem.Value == null || Beatmap.IsDefault))
|
||||
return;
|
||||
|
||||
if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable)
|
||||
return;
|
||||
|
||||
StartPlay();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user