mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Map generation limit: Rewrite
The previous implementation applied the setting to blockpos_over_limit(), objectpos_over_limit() and in createSector(), causing many bugs near the world edge. First revert the previous implementation. Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity. Add a new function to mapblock.h called blockpos_over_mapgen_limit() that checks against the map_generation_limit setting, and call this only from the code that decides where mapgen stops. Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the chance of bugs, there is no need to use map_generation_limit here.
This commit is contained in:
parent
525d2a0d51
commit
d3131aeae7
4 changed files with 45 additions and 60 deletions
|
@ -606,7 +606,7 @@ void *EmergeThread::run()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (blockpos_over_limit(pos))
|
||||
if (blockpos_over_max_limit(pos))
|
||||
continue;
|
||||
|
||||
bool allow_gen = bedata.flags & BLOCK_EMERGE_ALLOW_GEN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue