]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.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 / dialog_multiplayer_create_mapinfo.c
index e242b6667546e5576444ccee6fa668908693be3f..732b4468b02af75039c4109a289a3d1304b5209f 100644 (file)
@@ -54,7 +54,8 @@ void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb)
        me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
        me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
        me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
-       me.previewImage.src = me.currentMapPreviewImage;
+       if(fexists(strcat("maps/", me.currentMapPreviewImage, ".jpg")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".png")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".tga")))
+               me.previewImage.src = me.currentMapPreviewImage;
 
        for(i = 0; i < GameType_GetCount(); ++i)
        {