mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Optimize glaciers check
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -160,7 +160,7 @@ public:
|
|||||||
|
|
||||||
static uint32_t const desertType = classif().GetTypeByPath({"natural", "desert"});
|
static uint32_t const desertType = classif().GetTypeByPath({"natural", "desert"});
|
||||||
static uint32_t const glacierType = classif().GetTypeByPath({"natural", "glacier"});
|
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<int>(m_header.GetScalesCount()) - 1;
|
int const scalesStart = static_cast<int>(m_header.GetScalesCount()) - 1;
|
||||||
for (int i = scalesStart; i >= 0; --i)
|
for (int i = scalesStart; i >= 0; --i)
|
||||||
@@ -183,7 +183,7 @@ public:
|
|||||||
if (i == 0 || i == 1)
|
if (i == 0 || i == 1)
|
||||||
++level;
|
++level;
|
||||||
}
|
}
|
||||||
if (!IsCountry() && isArea && isLowDetail)
|
if (isLowDetail)
|
||||||
{
|
{
|
||||||
// pastk: reduce detalisation of glaciers and deserts on World map
|
// pastk: reduce detalisation of glaciers and deserts on World map
|
||||||
if (level <= scales::GetUpperWorldScale())
|
if (level <= scales::GetUpperWorldScale())
|
||||||
|
|||||||
Reference in New Issue
Block a user