mirror of
https://github.com/minetest/minetest.git
synced 2025-04-16 07:11:36 +02:00
Biomemap: Simplify code of recent commit (#7398)
This commit is contained in:
@ -765,15 +765,12 @@ void MapgenBasic::generateBiomes()
|
|||||||
// If no stone surface was detected in this mapchunk column the biomemap
|
// If no stone surface was detected in this mapchunk column the biomemap
|
||||||
// will be empty for this (x, z) position. Add the currently active
|
// 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
|
// biome to the biomemap, or if biome is NULL calculate it for this
|
||||||
// position.
|
// position and add it.
|
||||||
if (biomemap[index] == BIOME_NONE) {
|
if (biomemap[index] == BIOME_NONE) {
|
||||||
if (biome) {
|
if (!biome)
|
||||||
|
biome = biomegen->getBiomeAtIndex(
|
||||||
|
index, v3s16(x, node_min.Y, z));
|
||||||
biomemap[index] = biome->index;
|
biomemap[index] = biome->index;
|
||||||
} else {
|
|
||||||
biome =
|
|
||||||
biomegen->getBiomeAtIndex(index, v3s16(x, node_min.Y, z));
|
|
||||||
biomemap[index] = biome->index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user