mirror of
https://github.com/ppy/osu
synced 2025-03-24 11:56:58 +00: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()
|
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.
|
// 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.
|
// For now, we want to game to switch to the new game so need to request exiting from the play screen.
|
||||||
if (!ParentScreen.IsCurrentScreen())
|
if (!ParentScreen.IsCurrentScreen())
|
||||||
@ -391,6 +388,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
if (client.LocalUser?.State == MultiplayerUserState.Spectating && (SelectedItem.Value == null || Beatmap.IsDefault))
|
if (client.LocalUser?.State == MultiplayerUserState.Spectating && (SelectedItem.Value == null || Beatmap.IsDefault))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable)
|
||||||
|
return;
|
||||||
|
|
||||||
StartPlay();
|
StartPlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user