}
else
{
- if(fexists(strcat(pic, ".jpg")) || fexists(strcat(pic, ".png")) || fexists(strcat(pic, ".tga")))
- drawpic(pos, pic, img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
- else
+ if(precache_pic(pic) == "")
drawpic(pos, draw_UseSkinFor("nopreview_player"), img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
+ else
+ drawpic(pos, pic, img_size, '1 1 1', alpha, DRAWFLAG_NORMAL);
}
if(id == mv_ownvote)
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
s = ftos(p);
- if(fexists(strcat("maps/", campaign_mapname[i], ".jpg")) || fexists(strcat("maps/", campaign_mapname[i], ".png")) || fexists(strcat("maps/", campaign_mapname[i], ".tga")))
- draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
- else
+ if(precache_pic(strcat("maps/", campaign_mapname[i])) == "")
draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+ else
+ draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
if(i < me.campaignIndex)
draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
- if(fexists(strcat("maps/", me.currentMapPreviewImage, ".jpg")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".png")) || fexists(strcat("maps/", me.currentMapPreviewImage, ".tga")))
- me.previewImage.src = me.currentMapPreviewImage;
- else
+ if(precache_pic(strcat("maps/", currentMapPreviewImage)) == "")
me.previewImage.src = "nopreview_map";
+ else
+ me.previewImage.src = me.currentMapPreviewImage;
for(i = 0; i < GameType_GetCount(); ++i)
{
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
s = ftos(p);
- 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);
- else
+ if(precache_pic(strcat("maps/", 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("/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);
me.currentModelDescription = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_DESC));
// fix the image
- if(fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".jpg")) || fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".png")) || fexists(strcat(me.currentModel, "_", ftos(me.currentSkin), ".tga")))
+ if(precache_pic(strcat(me.currentModel, "_", ftos(me.currentSkin))) == "")
me.src = me.currentModelImage;
else
me.src = draw_UseSkinFor("nopreview_player");