X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fserverlist.qh;h=019e11abe42164bfc809958ddd30f9c54da5f768;hb=6ff75d79efcd81b48aca3a64b2257c0ba16c2df0;hp=8ad1856b07986ba5477b1f5a6b104e7ed486cab4;hpb=ebec51e2a451b28980fcd246eb002b6d0c6bae8a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/serverlist.qh b/qcsrc/menu/xonotic/serverlist.qh index 8ad1856b0..019e11abe 100644 --- a/qcsrc/menu/xonotic/serverlist.qh +++ b/qcsrc/menu/xonotic/serverlist.qh @@ -37,6 +37,7 @@ CLASS(XonoticServerList, XonoticListBox) METHOD(XonoticServerList, setSortOrder, void(entity, float, float)); ATTRIB(XonoticServerList, filterShowEmpty, float, 1); ATTRIB(XonoticServerList, filterShowFull, float, 1); + ATTRIB(XonoticServerList, filterShowLaggy, float, 0); ATTRIB(XonoticServerList, filterString, string); ATTRIB(XonoticServerList, controlledTextbox, entity); ATTRIB(XonoticServerList, ipAddressBox, entity); @@ -52,7 +53,6 @@ CLASS(XonoticServerList, XonoticListBox) ATTRIB(XonoticServerList, sortButton4, entity); ATTRIB(XonoticServerList, sortButton5, entity); ATTRIB(XonoticServerList, connectButton, entity); - //ATTRIB(XonoticServerList, disconnectButton, entity); ATTRIB(XonoticServerList, infoButton, entity); ATTRIB(XonoticServerList, currentSortOrder, float, 0); ATTRIB(XonoticServerList, currentSortField, float, -1); @@ -62,6 +62,7 @@ CLASS(XonoticServerList, XonoticListBox) ATTRIB(XonoticServerList, seenIPv4, float, 0); ATTRIB(XonoticServerList, seenIPv6, float, 0); ATTRIB(XonoticServerList, categoriesHeight, float, 1.25); + ATTRIB(XonoticServerList, serversHeight, float, 1.0); METHOD(XonoticServerList, getTotalHeight, float(entity)); METHOD(XonoticServerList, getItemAtPos, float(entity, float)); @@ -76,6 +77,7 @@ void ServerList_Filter_Change(entity box, entity me); void ServerList_Categories_Click(entity box, entity me); void ServerList_ShowEmpty_Click(entity box, entity me); void ServerList_ShowFull_Click(entity box, entity me); +void ServerList_ShowLaggy_Click(entity box, entity me); void ServerList_Connect_Click(entity btn, entity me); void ServerList_Update_favoriteButton(entity btn, entity me); void ServerList_Favorite_Click(entity btn, entity me); @@ -108,6 +110,7 @@ float autocvar_menu_slist_categories; float autocvar_menu_slist_categories_onlyifmultiple; float autocvar_menu_slist_purethreshold; float autocvar_menu_slist_modimpurity; +float autocvar_menu_slist_maxping = 300; float autocvar_menu_slist_recommendations; float autocvar_menu_slist_recommendations_maxping; float autocvar_menu_slist_recommendations_minfreeslots; @@ -121,14 +124,11 @@ const float REFRESHSERVERLIST_RESET = 3; // ..., also clear the list first // function declarations float IsServerInList(string list, string srv); -#define IsFavorite(srv) IsServerInList(cvar_string("net_slist_favorites"), srv) -#define IsPromoted(srv) IsServerInList(_Nex_ExtResponseSystem_PromotedServers, srv) -#define IsRecommended(srv) IsServerInList(_Nex_ExtResponseSystem_RecommendedServers, srv) entity RetrieveCategoryEnt(float catnum); float CategoryOverride(float cat); -float m_gethostcachecategory(float entry) { return CategoryOverride(CategoryForEntry(entry)); } +float m_gethostcachecategory(float entry); // fields for category entities