Skip to content

Commit

Permalink
Biomemap: Simplify code of recent commit (#7398)
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Jun 2, 2018
1 parent 99143f4 commit f4ca830
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/mapgen/mapgen.cpp
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit f4ca830

Please sign in to comment.