From f4ca830abe1aa22875c99b31bf2ee56e26f83f05 Mon Sep 17 00:00:00 2001 From: Paramat Date: Sat, 2 Jun 2018 21:28:26 +0100 Subject: Biomemap: Simplify code of recent commit (#7398) --- src/mapgen/mapgen.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/mapgen/mapgen.cpp') 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; } } } -- cgit v1.2.3