Revert 9846f374a0 as it doesn't work with the packaged version, refs #4313, because that comes with DDS files instead of PNGs and FileExists does not translate that like the sprite attribute does.

This was SVN commit r18905.
This commit is contained in:
elexis 2016-11-04 12:18:11 +00:00
parent 661cb8c932
commit b83168cfbf

View File

@ -31,10 +31,9 @@ function getMapDescriptionAndPreview(mapType, mapName)
*/
function setMapPreviewImage(guiObject, filename)
{
let path = "session/icons/mappreview/";
Engine.GetGUIObjectByName(guiObject).sprite =
"cropped:" + 400/512 + "," + 300/512 + ":" +
path + (Engine.FileExists("art/textures/ui/" + path + filename) ? filename : "nopreview.png");
"session/icons/mappreview/" + filename;
}
/**