From 8d3190e77a9d13bf0bca3ecdf40a788ce1d39d58 Mon Sep 17 00:00:00 2001 From: Paramat Date: Thu, 21 Jun 2018 19:28:54 +0100 Subject: 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. --- src/mapgen/mg_biome.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mapgen/mg_biome.cpp') diff --git a/src/mapgen/mg_biome.cpp b/src/mapgen/mg_biome.cpp index e02eee703..7f717011c 100644 --- a/src/mapgen/mg_biome.cpp +++ b/src/mapgen/mg_biome.cpp @@ -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); } -- cgit v1.2.3