]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/maplist.c
Don't draw map previews if the images are missing. Later to be replaced with a "previ...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / maplist.c
index 9ce298082c2fca2f236ba1ea987ebe001005a1f4..1edb222cd987de29e801302cf89a1f4a9e8efcfb 100644 (file)
@@ -186,7 +186,8 @@ void XonoticMapList_drawListBoxItem(entity me, float i, vector absSize, float is
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
 
        s = ftos(p);
-       draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+       if(fexists(strcat("maps/", MapInfo_Map_bspname, ".jpg")) || fexists(strcat("maps/", MapInfo_Map_bspname, ".png")) || fexists(strcat("maps/", MapInfo_Map_bspname, ".tga")))
+               draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
        if(included)
                draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
        s = draw_TextShortenToWidth(MapInfo_Map_titlestring, me.columnNameSize, 0, me.realFontSize);