diff options
author | Paramat <paramat@users.noreply.github.com> | 2018-06-02 21:28:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-02 21:28:26 +0100 |
commit | f4ca830abe1aa22875c99b31bf2ee56e26f83f05 (patch) | |
tree | 7bfcc7297944a762b788832de8d6316b4501fa06 | |
parent | 99143f494711034068685b6ee845ce19fa09d7d9 (diff) | |
download | minetest-f4ca830abe1aa22875c99b31bf2ee56e26f83f05.tar.gz minetest-f4ca830abe1aa22875c99b31bf2ee56e26f83f05.tar.bz2 minetest-f4ca830abe1aa22875c99b31bf2ee56e26f83f05.zip |
Biomemap: Simplify code of recent commit (#7398)
-rw-r--r-- | src/mapgen/mapgen.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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; } } } |