1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-10 03:55:20 +01:00

Mapgen: Fix biome Y calculation regression

BiomeGen::getNextTransitionY(y) did not guarantee the condition (y < biome_y_min)
of the next loop because the function may return the value (biome_y_min - 1).
Hence, the biome was not updated until one Y coordinate after.
This commit is contained in:
SmallJoker
2024-11-28 22:12:24 +01:00
committed by SmallJoker
parent 50928b9759
commit 480eb7d816
5 changed files with 24 additions and 15 deletions

View File

@@ -197,7 +197,8 @@ private:
Noise *noise_heat_blend;
Noise *noise_humidity_blend;
// ordered descending
/// Y values at which biomes may transition.
/// This array may only be used for downwards scanning!
std::vector<s16> m_transitions_y;
};