track selected server
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4027 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -561,7 +561,13 @@ void refreshservers(void *menu, bool init)
|
||||
checkresolver();
|
||||
checkpings();
|
||||
if(totalmillis - lastinfo >= servpingrate/(maxservpings ? (servers.length() + maxservpings - 1) / maxservpings : 1)) pingservers();
|
||||
serverinfo *oldsel = NULL;
|
||||
if(menu && servers.inrange(((gmenu *)menu)->menusel)) oldsel = servers[((gmenu *)menu)->menusel];
|
||||
servers.sort(sicompare);
|
||||
if(oldsel && oldsel->lastpingmillis - servermenumillis > 1000)
|
||||
{
|
||||
loopv(servers) if(servers[i] == oldsel) { ((gmenu *)menu)->menusel = i; break; }
|
||||
}
|
||||
if(menu)
|
||||
{
|
||||
static const char *title[NUMSERVSORT] =
|
||||
|
||||
Reference in New Issue
Block a user