From: Martin Taibr Date: Sun, 12 Apr 2020 18:30:58 +0000 (+0200) Subject: more cleanup X-Git-Tag: xonotic-v0.8.5~1120 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d57feab0bd2faa2f3aae1931a65c7c4e367f712f;p=xonotic%2Fxonotic-data.pk3dir.git more cleanup --- diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 04b45d0c6..49635bba7 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -8,10 +8,9 @@ void SL_ProcessCategoryOverrides(.string override_field_string, .float override_field) { - string s; for (int i = 0; i < category_ent_count; ++i) { - s = categories[i].override_field_string; + string s = categories[i].override_field_string; if (s != "" && s != categories[i].cat_name) { int catnum = 0; @@ -70,22 +69,19 @@ entity RetrieveCategoryEnt(int catnum) bool IsServerInList(string list, string srv) { - string p; - int i, n; if(srv == "") return false; srv = netaddress_resolve(srv, 26000); if(srv == "") return false; - p = crypto_getidfp(srv); - n = tokenize_console(list); - for(i = 0; i < n; ++i) + string p = crypto_getidfp(srv); + int n = tokenize_console(list); + for(int i = 0; i < n; ++i) { if(substring(argv(i), 0, 1) != "[" && strlen(argv(i)) == 44 && strstrofs(argv(i), ".", 0) < 0) { - if(p) - if(argv(i) == p) - return true; + if(p && argv(i) == p) + return true; } else {