1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Do not decrease the density of obstacles in zones of medium treasure value. For high values, decrease them more rapidly.

This commit is contained in:
Tomasz Zieliński 2023-06-10 18:02:26 +02:00
parent 65a8478b74
commit 983633d73b

View File

@ -215,10 +215,10 @@ void Zone::fractalize()
treasureDensity += t.density;
}
if (treasureValue > 100)
if (treasureValue > 200)
{
//Less obstacles - max span is 1 (no obstacles)
spanFactor = 1.0f - ((std::max(0, (1000 - treasureValue)) / 1000.f) * (1 - spanFactor));
spanFactor = 1.0f - ((std::max(0, (1000 - treasureValue)) / (1000.f - 200)) * (1 - spanFactor));
}
else if (treasureValue < 100)
{