1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Biome API: Fix absent water decorations and dust, in deep water (#7470)

Previously, the biomemap was 'BIOME_NONE' for a mapchunk column if a
stone surface was not found in it, causing water surface decorations
and water surface dust to fail.

Store the biome ID of the biome calculated at a water surface and add
it to the biomemap if the biomemap is 'BIOME_NONE' for the mapchunk
column. The biome calculated at a stone surface still has priority
for the biomemap entry, as it should.

Edit an incorrect comment.
This commit is contained in:
Paramat 2018-06-21 19:28:54 +01:00 committed by GitHub
parent 525fa9145e
commit 8d3190e77a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -194,9 +194,9 @@ BiomeGenOriginal::BiomeGenOriginal(BiomeManager *biomemgr,
humidmap = noise_humidity->result;
biomemap = new biome_t[m_csize.X * m_csize.Z];
// Initialise with the ID of the default biome so that cavegen can get
// biomes when biome generation (which calculates the biomemap IDs) is
// disabled.
// Initialise with the ID of 'BIOME_NONE' so that cavegen can get the
// fallback biome when biome generation (which calculates the biomemap IDs)
// is disabled.
memset(biomemap, 0, sizeof(biome_t) * m_csize.X * m_csize.Z);
}