From: Paramat Date: Sat, 2 Jun 2018 20:28:26 +0000 (+0100) Subject: Biomemap: Simplify code of recent commit (#7398) X-Git-Tag: 5.0.0~382 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f4ca830abe1aa22875c99b31bf2ee56e26f83f05;p=oweals%2Fminetest.git Biomemap: Simplify code of recent commit (#7398) --- diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index eb7803144..6163d17af 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -765,15 +765,12 @@ void MapgenBasic::generateBiomes() // If no stone surface was detected in this mapchunk column the biomemap // will be empty for this (x, z) position. Add the currently active // biome to the biomemap, or if biome is NULL calculate it for this - // position. + // position and add it. if (biomemap[index] == BIOME_NONE) { - if (biome) { - biomemap[index] = biome->index; - } else { - biome = - biomegen->getBiomeAtIndex(index, v3s16(x, node_min.Y, z)); - biomemap[index] = biome->index; - } + if (!biome) + biome = biomegen->getBiomeAtIndex( + index, v3s16(x, node_min.Y, z)); + biomemap[index] = biome->index; } } }