X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fserverlist.qc;h=87c8852a988691e848a20c753501a9a174e445df;hp=503a975c326fe09ba82aab79ac0b5131d6cb41a5;hb=ca43a51345c0e7d23b862eac0f7ea292800f9aa8;hpb=49dd3844a37bb91e3c48654dead867b15ce94638 diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 503a975c3..87c8852a9 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 == "")); @@ -806,7 +810,7 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is vector oldscale = draw_scale; vector oldshift = draw_shift; #define SET_YRANGE(start,end) \ - draw_scale = boxToGlobalSize(eX * 1 + eY * (end - start), oldscale); \ + draw_scale = boxToGlobalSize(eX + eY * (end - start), oldscale); \ draw_shift = boxToGlobal(eY * start, oldshift, oldscale); for (j = 0; j < category_draw_count; ++j) {