1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Merge pull request #11595 from peppy/leaderboard-bind-handlers-later

Bind MultiplayerGameplayLeaderboard to player updates later in load process
This commit is contained in:
Dan Balasescu 2021-01-25 18:18:54 +09:00 committed by GitHub
commit 803ada42ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,8 +53,6 @@ namespace osu.Game.Screens.Play.HUD
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, IAPIProvider api)
{
streamingClient.OnNewFrames += handleIncomingFrames;
foreach (var userId in playingUsers)
{
streamingClient.WatchUser(userId);
@ -90,6 +88,9 @@ namespace osu.Game.Screens.Play.HUD
playingUsers.BindTo(multiplayerClient.CurrentMatchPlayingUserIds);
playingUsers.BindCollectionChanged(usersChanged);
// this leaderboard should be guaranteed to be completely loaded before the gameplay starts (is a prerequisite in MultiplayerPlayer).
streamingClient.OnNewFrames += handleIncomingFrames;
}
private void usersChanged(object sender, NotifyCollectionChangedEventArgs e)