Skip to content

Commit f4ca830

Browse files
authoredJun 2, 2018
Biomemap: Simplify code of recent commit (#7398)
1 parent 99143f4 commit f4ca830

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed
 

Diff for: ‎src/mapgen/mapgen.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,12 @@ void MapgenBasic::generateBiomes()
765765
// If no stone surface was detected in this mapchunk column the biomemap
766766
// will be empty for this (x, z) position. Add the currently active
767767
// biome to the biomemap, or if biome is NULL calculate it for this
768-
// position.
768+
// position and add it.
769769
if (biomemap[index] == BIOME_NONE) {
770-
if (biome) {
771-
biomemap[index] = biome->index;
772-
} else {
773-
biome =
774-
biomegen->getBiomeAtIndex(index, v3s16(x, node_min.Y, z));
775-
biomemap[index] = biome->index;
776-
}
770+
if (!biome)
771+
biome = biomegen->getBiomeAtIndex(
772+
index, v3s16(x, node_min.Y, z));
773+
biomemap[index] = biome->index;
777774
}
778775
}
779776
}

0 commit comments

Comments
 (0)
Please sign in to comment.