]> git.lizzy.rs Git - minetest.git/blobdiff - src/mods.cpp
Exclude vertical mapblock borders when setting light
[minetest.git] / src / mods.cpp
index b4e075b1eae52b8d5202e1369ba7c274eb6c342e..7d6b4f5f7686f64389e7d2c49f216e3d9329afc2 100644 (file)
@@ -339,19 +339,14 @@ Json::Value getModstoreUrl(std::string url)
 
        bool special_http_header = true;
 
-       try{
+       try {
                special_http_header = g_settings->getBool("modstore_disable_special_http_header");
-       }
-       catch(SettingNotFoundException &e) {
-       }
+       } catch (SettingNotFoundException) {}
 
        if (special_http_header) {
                extra_headers.push_back("Accept: application/vnd.minetest.mmdb-v1+json");
-               return fetchJsonValue(url, &extra_headers);
-       }
-       else {
-               return fetchJsonValue(url, NULL);
        }
+       return fetchJsonValue(url, special_http_header ? &extra_headers : NULL);
 }
 
 #endif