mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Mapgen flags: Add 'biomes' global mapgen flag (#7355)
Previously the only way to disable biomes was to 'clear' the registered biomes in a mod, but this method causes large amounts of unnecessary processing: 1. Calculation of 4 2D noises. 2. Looping through all nodes of a mapchunk replacing nodes with identical nodes. The new flag disables those operations.
This commit is contained in:
parent
9ca37d86a3
commit
0b23253447
10 changed files with 44 additions and 20 deletions
|
@ -36,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#define MG_FLAT 0x08 // Deprecated. Moved into mgv6 flags
|
||||
#define MG_LIGHT 0x10
|
||||
#define MG_DECORATIONS 0x20
|
||||
#define MG_BIOMES 0x40
|
||||
|
||||
typedef u8 biome_t; // copy from mg_biome.h to avoid an unnecessary include
|
||||
|
||||
|
@ -122,7 +123,7 @@ struct MapgenParams {
|
|||
u64 seed = 0;
|
||||
s16 water_level = 1;
|
||||
s16 mapgen_limit = MAX_MAP_GENERATION_LIMIT;
|
||||
u32 flags = MG_CAVES | MG_LIGHT | MG_DECORATIONS;
|
||||
u32 flags = MG_CAVES | MG_LIGHT | MG_DECORATIONS | MG_BIOMES;
|
||||
|
||||
BiomeParams *bparams = nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue