From 8f6b5d58025eeb12daca4e60d19545398a86f2a4 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Fri, 28 Aug 2015 11:55:09 +0200 Subject: [PATCH] fix skymap autodownload error handling - suppress error messages during map config execution, just like all missing media errors are suppressed during the first attempt - don't queue manual attempts to load nonexisting skymaps for download (this is now consistent with other manual media use) --- source/src/texture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/src/texture.cpp b/source/src/texture.cpp index 10e16700..50dd39a1 100644 --- a/source/src/texture.cpp +++ b/source/src/texture.cpp @@ -579,17 +579,20 @@ void loadskymap(bool reload) } flagmapconfigchange(); } + bool old_silent_texture_load = silent_texture_load; + if(autodownload && execcontext == IEXC_MAPCFG) silent_texture_load = true; loopi(6) { defformatstring(name)("packages/%s%s_%s.jpg", legacyprefix, loadsky, side[i]); sky[i] = textureload(name, 3); - if(sky[i] == notexture && !reload && autodownload) + if(sky[i] == notexture && !reload && autodownload && execcontext == IEXC_MAPCFG) { defformatstring(dl)("packages/%s%s", legacyprefix, loadsky); requirepackage(PCK_SKYBOX, dl); break; } } + silent_texture_load = old_silent_texture_load; } void loadnotexture(char *c)