]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu/base/hostcache.qc
numbots;
[divverent/nexuiz.git] / data / qcsrc / menu / base / hostcache.qc
1 // DP/Nex Menu
2 // base/hostcache.qc
3
4 void() HostCache_Init =
5 {
6         SLIST_FIELD_CNAME = gethostcacheindexforkey( "cname" );
7         SLIST_FIELD_PING = gethostcacheindexforkey( "ping" );
8         SLIST_FIELD_GAME = gethostcacheindexforkey( "game" );
9         SLIST_FIELD_MOD = gethostcacheindexforkey( "mod" );
10         SLIST_FIELD_MAP = gethostcacheindexforkey( "map" );
11         SLIST_FIELD_NAME = gethostcacheindexforkey( "name" );
12         SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
13         SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
14         SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey( "numhumans" );
15         SLIST_FIELD_NUMBOTS = gethostcacheindexforkey( "numbots" );
16         SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
17 };
18
19 void() HostCache_Update =
20 {
21         HostCache_ViewCount = gethostcachevalue( SLIST_HOSTCACHEVIEWCOUNT );
22         HostCache_TotalCount = gethostcachevalue( SLIST_HOSTCACHETOTALCOUNT );
23         HostCache_MasterQueryCount = gethostcachevalue( SLIST_MASTERQUERYCOUNT );
24         HostCache_MasterReplyCount = gethostcachevalue( SLIST_MASTERREPLYCOUNT );
25         HostCache_ServerQueryCount = gethostcachevalue( SLIST_SERVERQUERYCOUNT );
26         HostCache_ServerReplyCount = gethostcachevalue( SLIST_SERVERREPLYCOUNT );
27         HostCache_SortField = gethostcachevalue( SLIST_SORTFIELD );
28         HostCache_SortDescending = gethostcachevalue( SLIST_SORTDESCENDING );
29 };
30
31 void() HostCache_ResortViewSet =
32 {
33         resorthostcache();
34         HostCache_Update();
35 };
36
37 void() HostCache_RefreshHostCache =
38 {
39         refreshhostcache();
40         HostCache_Update();
41 };