Allow changing q3_ui server source during refresh

This makes it easier to scroll through the list, especially since
"Local" source now refreshes until a local server is found.
This commit is contained in:
Zack Middleton 2017-07-01 13:30:16 -05:00
parent 0ba359c29e
commit 8c3d1fcf59

View file

@ -421,7 +421,6 @@ static void ArenaServers_UpdateMenu( void ) {
} }
else { else {
// all servers pinged - enable controls // all servers pinged - enable controls
g_arenaservers.master.generic.flags &= ~QMF_GRAYED;
g_arenaservers.gametype.generic.flags &= ~QMF_GRAYED; g_arenaservers.gametype.generic.flags &= ~QMF_GRAYED;
g_arenaservers.sortkey.generic.flags &= ~QMF_GRAYED; g_arenaservers.sortkey.generic.flags &= ~QMF_GRAYED;
g_arenaservers.showempty.generic.flags &= ~QMF_GRAYED; g_arenaservers.showempty.generic.flags &= ~QMF_GRAYED;
@ -448,7 +447,6 @@ static void ArenaServers_UpdateMenu( void ) {
g_arenaservers.statusbar.string = "Press SPACE to stop"; g_arenaservers.statusbar.string = "Press SPACE to stop";
// disable controls during refresh // disable controls during refresh
g_arenaservers.master.generic.flags |= QMF_GRAYED;
g_arenaservers.gametype.generic.flags |= QMF_GRAYED; g_arenaservers.gametype.generic.flags |= QMF_GRAYED;
g_arenaservers.sortkey.generic.flags |= QMF_GRAYED; g_arenaservers.sortkey.generic.flags |= QMF_GRAYED;
g_arenaservers.showempty.generic.flags |= QMF_GRAYED; g_arenaservers.showempty.generic.flags |= QMF_GRAYED;
@ -1128,6 +1126,8 @@ ArenaServers_SetType
*/ */
int ArenaServers_SetType( int type ) int ArenaServers_SetType( int type )
{ {
ArenaServers_StopRefresh();
if(type >= UIAS_GLOBAL1 && type <= UIAS_GLOBAL5) if(type >= UIAS_GLOBAL1 && type <= UIAS_GLOBAL5)
{ {
char masterstr[2], cvarname[sizeof("sv_master1")]; char masterstr[2], cvarname[sizeof("sv_master1")];