1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Allow more than 255 biomes, document new maximum (#9855)

Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
This commit is contained in:
Paramat 2020-05-20 22:16:14 +01:00 committed by GitHub
parent c47a680db7
commit 42fcfb75e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 45 deletions

View file

@ -206,8 +206,7 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
// All-surfaces decorations
// Check biome of column
if (mg->biomemap && !biomes.empty()) {
std::unordered_set<u8>::const_iterator iter =
biomes.find(mg->biomemap[mapindex]);
auto iter = biomes.find(mg->biomemap[mapindex]);
if (iter == biomes.end())
continue;
}
@ -259,8 +258,7 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
continue;
if (mg->biomemap && !biomes.empty()) {
std::unordered_set<u8>::const_iterator iter =
biomes.find(mg->biomemap[mapindex]);
auto iter = biomes.find(mg->biomemap[mapindex]);
if (iter == biomes.end())
continue;
}