X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fmaplist.qc;h=1fa065874554ce666fa883884d2347359d076bf0;hb=a3e71389992c582ccf77ca5b11d1f0ceee50eb9f;hp=73ce4616be8d3ef5fd64d97e7f816bd8e20ce3fd;hpb=02780fb9caead37e8d82121aa8612d1245700e4d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/maplist.qc b/qcsrc/menu/xonotic/maplist.qc index 73ce4616b..1fa065874 100644 --- a/qcsrc/menu/xonotic/maplist.qc +++ b/qcsrc/menu/xonotic/maplist.qc @@ -79,7 +79,8 @@ void XonoticMapList_g_maplistCacheToggle(entity me, float i) void XonoticMapList_draw(entity me) { if(me.startButton) - me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems)); + me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems) + || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED) && cvar("g_campaign"))); SUPER(XonoticMapList).draw(me); } @@ -157,7 +158,7 @@ void XonoticMapList_drawListBoxItem(entity me, int i, vector absSize, bool isSel if(draw_PictureSize(strcat("/maps/", MapInfo_Map_bspname)) == '0 0 0') { - if(draw_PictureSize(strcat("/levelshots/", MapInfo_Map_bspname)) == '0 0 0') + if(!draw_PictureExists(strcat("/levelshots/", MapInfo_Map_bspname))) draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha); else draw_Picture(me.columnPreviewOrigin * eX, strcat("/levelshots/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);