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:
parent
c47a680db7
commit
42fcfb75e8
11 changed files with 55 additions and 45 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue