diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-22 19:38:51 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:00 +0000 |
commit | 8de24fdecd6952b74bc7504417b4690439a1a125 (patch) | |
tree | 4dd81760abb68d0bd4543f470f623ac4a2ef603e /src/client | |
parent | 377335805ff3d4c0d6fe13c6f81bd42bba4d51cf (diff) |
* Ignore featured status for serverlist sorting if the featured server's ping is high
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/cl_ui.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/cl_ui.c b/src/client/cl_ui.c index 9971942f..1ba367de 100644 --- a/src/client/cl_ui.c +++ b/src/client/cl_ui.c @@ -407,6 +407,7 @@ static serverInfo_t *LAN_GetServerPtr( int source, int n ) { return NULL; } +#define FEATURED_MAXPING 200 /* ==================== LAN_CompareServers @@ -423,14 +424,13 @@ static int LAN_CompareServers( int source, int sortKey, int sortDir, int s1, int } // featured servers on top - // this is not so that they are more noticeable but that codewise it - // makes it much simpler to have them contiguous in the list - // so changing this also requires changing the feederID counting and - // similar code that depends on them coming first - res = Q_stricmpn( server1->label, server2->label, MAX_FEATLABEL_CHARS ); - if( res ) - return -res; - + if( ( server1->label[ 0 ] && server1->ping <= FEATURED_MAXPING ) || + ( server2->label[ 0 ] && server2->ping <= FEATURED_MAXPING ) ) { + res = Q_stricmpn( server1->label, server2->label, MAX_FEATLABEL_CHARS ); + if( res ) + return -res; + } + res = 0; switch( sortKey ) { case SORT_HOST: |