Skip to content

Commit

Permalink
Make UI continue searching for local servers until found
Browse files Browse the repository at this point in the history
When refreshing local servers, Team Arean UI never changed the status
message when it timed out. This gave a false impression it was still
looking for servers.

Let's continue looking for local servers in q3_ui and Team Arena UI
until one is found.
  • Loading branch information
zturtleman committed Jul 1, 2017
1 parent 21eeaee commit 0ba359c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions code/q3_ui/ui_servers2.c
Expand Up @@ -881,6 +881,13 @@ static void ArenaServers_DoRefresh( void )
return;
}
}
} else if (g_servertype == UIAS_LOCAL) {
if (!trap_LAN_GetServerCount(AS_LOCAL)) {
// no local servers found, check again
trap_Cmd_ExecuteText( EXEC_APPEND, "localservers\n" );
g_arenaservers.refreshtime = uis.realtime + 5000;
return;
}
}

if (uis.realtime < g_arenaservers.nextpingtime)
Expand Down
6 changes: 5 additions & 1 deletion code/ui/ui_main.c
Expand Up @@ -5985,6 +5985,10 @@ static void UI_DoServerRefresh( void )
UI_BuildServerDisplayList(2);
// stop the refresh
UI_StopServerRefresh();
} else if ( ui_netSource.integer == UIAS_LOCAL ) {
// no local servers found, check again
trap_Cmd_ExecuteText( EXEC_NOW, "localservers\n" );
uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime + 5000;
}
//
UI_BuildServerDisplayList(qfalse);
Expand Down Expand Up @@ -6032,7 +6036,7 @@ static void UI_StartServerRefresh(qboolean full, qboolean force)
//
if( ui_netSource.integer == UIAS_LOCAL ) {
trap_Cmd_ExecuteText( EXEC_NOW, "localservers\n" );
uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime + 1000;
uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime + 5000;
return;
}

Expand Down

0 comments on commit 0ba359c

Please sign in to comment.