From 85727c4db2bd197d2e2421e405a71ba7fc013471 Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Tue, 2 Sep 2025 12:01:50 +0700 Subject: [PATCH] Optimize glaciers check Signed-off-by: Konstantin Pastbin --- generator/feature_sorter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/feature_sorter.cpp b/generator/feature_sorter.cpp index 4871c88ed..97def947c 100644 --- a/generator/feature_sorter.cpp +++ b/generator/feature_sorter.cpp @@ -160,7 +160,7 @@ public: static uint32_t const desertType = classif().GetTypeByPath({"natural", "desert"}); static uint32_t const glacierType = classif().GetTypeByPath({"natural", "glacier"}); - bool const isLowDetail = (fb.HasType(desertType, 2) || fb.HasType(glacierType, 2)); + bool const isLowDetail = !IsCountry() && isArea && (fb.HasType(desertType, 2) || fb.HasType(glacierType, 2)); int const scalesStart = static_cast(m_header.GetScalesCount()) - 1; for (int i = scalesStart; i >= 0; --i) @@ -183,7 +183,7 @@ public: if (i == 0 || i == 1) ++level; } - if (!IsCountry() && isArea && isLowDetail) + if (isLowDetail) { // pastk: reduce detalisation of glaciers and deserts on World map if (level <= scales::GetUpperWorldScale())