Merge pull request #11268 from bdach/fix-room-song-select-stuck

Fix realtime multiplayer song select getting stuck after selecting invalid beatmap
This commit is contained in:
Dean Herbert 2020-12-24 11:26:07 +09:00 committed by GitHub
commit 1ac93d4eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -369,7 +369,6 @@ namespace osu.Game.Online.RealtimeMultiplayer
if (Room == null)
return;
// Update a few properties of the room instantaneously.
Schedule(() =>
{
if (Room == null)
@ -377,6 +376,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
Debug.Assert(apiRoom != null);
// Update a few properties of the room instantaneously.
Room.Settings = settings;
apiRoom.Name.Value = Room.Settings.Name;
@ -385,12 +385,12 @@ namespace osu.Game.Online.RealtimeMultiplayer
apiRoom.Playlist.Clear();
RoomChanged?.Invoke();
});
var req = new GetBeatmapSetRequest(settings.BeatmapID, BeatmapSetLookupType.BeatmapId);
req.Success += res => updatePlaylist(settings, res);
api.Queue(req);
});
}
private void updatePlaylist(MultiplayerRoomSettings settings, APIBeatmapSet onlineSet)

View File

@ -65,7 +65,10 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
if (t.IsCompletedSuccessfully)
this.Exit();
else
{
Logger.Log($"Could not use current beatmap ({t.Exception?.Message})", level: LogLevel.Important);
Carousel.AllowSelection = true;
}
});
});
}