mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 13:23:56 -07:00
Lobby performance improvement.
Since 8b437a0b1c, updatePlayerList() is called everytime a muc-message
is received, calling playersBox.SelectionChange(), calling
displayProfile() which requests the profile from the server again.
Similar cases should be handled in #3840.
This was SVN commit r17924.
This commit is contained in:
parent
cfe169d2bc
commit
8f4daa9dd0
1 changed files with 4 additions and 1 deletions
|
|
@ -353,7 +353,10 @@ function updatePlayerList()
|
|||
playersBox.list_status = presenceList;
|
||||
playersBox.list_rating = ratingList;
|
||||
playersBox.list = nickList;
|
||||
playersBox.selected = playersBox.list.indexOf(g_SelectedPlayer);
|
||||
|
||||
// To reduce rating-server load, only send the GUI event if the selection actually changed
|
||||
if (playersBox.selected != playersBox.list.indexOf(g_SelectedPlayer))
|
||||
playersBox.selected = playersBox.list.indexOf(g_SelectedPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue