diff options
author | Paramat <paramat@users.noreply.github.com> | 2020-05-20 22:16:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 22:16:14 +0100 |
commit | 42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6 (patch) | |
tree | 5a76856ca96330263cce9fae1985172b671c8324 /src/mapgen/mg_decoration.cpp | |
parent | c47a680db7f3c2f241cc444a1257607492872412 (diff) | |
download | minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.tar.gz minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.tar.bz2 minetest-42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6.zip |
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.
Diffstat (limited to 'src/mapgen/mg_decoration.cpp')
-rw-r--r-- | src/mapgen/mg_decoration.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mapgen/mg_decoration.cpp b/src/mapgen/mg_decoration.cpp index a9b67d239..a4cada396 100644 --- a/src/mapgen/mg_decoration.cpp +++ b/src/mapgen/mg_decoration.cpp @@ -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; } |