mirror of
https://github.com/nzp-team/quakec.git
synced 2024-12-01 08:21:48 +00:00
MENU: menu_coop.qc: add explanations for refreshing
This commit is contained in:
parent
8c86b48547
commit
d7cfeb3826
1 changed files with 11 additions and 0 deletions
|
@ -86,12 +86,22 @@ void() Menu_Coop_Browse_Refresh =
|
|||
|
||||
refreshtime = time + 0.5;
|
||||
|
||||
// reset cache masks
|
||||
resethostcachemasks();
|
||||
|
||||
// set the masks to our gamedir and game strings
|
||||
sethostcachemaskstring(0, gethostcacheindexforkey("gamedir"), cvar_string("game"), SLIST_TEST_EQUAL);
|
||||
|
||||
// set sort value to ping (ascending)
|
||||
sethostcachesort(gethostcacheindexforkey("ping"), false);
|
||||
|
||||
// flush the current cache and refresh it
|
||||
refreshhostcache(true);
|
||||
|
||||
// resort the cache (by ping)
|
||||
resorthostcache();
|
||||
|
||||
// get number of cached servers
|
||||
num_cached_servers = (int)gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
|
||||
};
|
||||
|
||||
|
@ -112,6 +122,7 @@ void() Menu_Coop_Browse_Update =
|
|||
|
||||
refreshtime = time + 0.5;
|
||||
|
||||
// call this every 0.5 seconds to keep probing the cache, but without flushing everything
|
||||
num_cached_servers = (int)gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue