X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fserverlist.qc;h=b781ff6819b55055b52d06d5288b0a32e3bf4bd1;hp=503a975c326fe09ba82aab79ac0b5131d6cb41a5;hb=76dd66af43f0f01131d019c3a8dacfe35a6f6a18;hpb=ff169c9d675521c4e05efe123024cf9703fd4984 diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 503a975c3..b781ff681 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -27,14 +27,17 @@ void RegisterSLCategories() for(i = 0; i < category_ent_count; ++i) \ { \ s = categories[i].override_string; \ - if((s != "") && (s != categories[i].cat_name)) \ + if(s != "" && s != categories[i].cat_name) \ { \ catnum = 0; \ for(x = 0; x < category_ent_count; ++x) \ - { if(categories[x].cat_name == s) { \ - catnum = (x+1); \ - break; \ - } } \ + { \ + if(categories[x].cat_name == s) \ + { \ + catnum = x + 1; \ + break; \ + } \ + } \ if(catnum) \ { \ strfree(categories[i].override_string); \ @@ -546,6 +549,7 @@ void XonoticServerList_draw(entity me) else { me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT); } me.connectButton.disabled = (me.lockedSelectedItem || (me.nItems == 0 && me.ipAddressBox.text == "")); + me.disconnectButton.disabled = (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED))); me.infoButton.disabled = (me.lockedSelectedItem || me.nItems == 0 || !owned); me.favoriteButton.disabled = (me.lockedSelectedItem || (me.nItems == 0 && me.ipAddressBox.text == ""));