fix showing player names in serverbrowser

Earlier the player names weren't displayed for a server on the top, if user
didn't change server selection after opening the serverbrowser.
This commit is contained in:
aurhat
2021-10-19 23:37:48 +02:00
parent 51f47427a2
commit f175ed866d
+3 -2
View File
@@ -1104,9 +1104,10 @@ void refreshservers(void *menu, bool init)
{
((gmenu *)menu)->menusel = ((gmenu *)menu)->items.length() - 1;
usedselect = true;
if(shownamesinbrowser) si.getinfo = EXTPING_NAMELIST;
}
if((shownamesinbrowser && servers[i] == oldsel && si.playernames.length()) || issearch)
bool showplayernames = shownamesinbrowser && !issearch && (servers[i] == oldsel || (((gmenu *)menu)->menusel == 0 && servers[i] == lastselectedserver));
if(showplayernames) si.getinfo = EXTPING_NAMELIST;
if((showplayernames && si.playernames.length()) || issearch)
{
int cur = 0;
char *t = NULL;