1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 12:17:46 +08:00

Ensure all users are shown on leaderboard (even when API lookup fails)

This commit is contained in:
Dean Herbert 2022-04-12 11:54:30 +09:00
parent 577e29351e
commit 0ba95a4483

View File

@ -89,10 +89,13 @@ namespace osu.Game.Screens.Play.HUD
{ {
var users = task.GetResultSafely(); var users = task.GetResultSafely();
foreach (var user in users) for (int i = 0; i < users.Length; i++)
{ {
if (user == null) var user = users[i] ??= new APIUser
continue; {
Id = playingUsers[i].UserID,
Username = "Unknown user",
};
var trackedUser = UserScores[user.Id]; var trackedUser = UserScores[user.Id];