summaryrefslogtreecommitdiff
path: root/src/mapgen/mapgen.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-06-08 23:24:36 +0100
committerGitHub <noreply@github.com>2018-06-08 23:24:36 +0100
commit0b23253447623cadf1c394984ce0eee977d54b9b (patch)
tree6417d00f8d850eeb9e9fbda0b7dcf94705763efe /src/mapgen/mapgen.h
parent9ca37d86a3f8fd35150880e3c64cb81796430d68 (diff)
downloadminetest-0b23253447623cadf1c394984ce0eee977d54b9b.tar.gz
minetest-0b23253447623cadf1c394984ce0eee977d54b9b.tar.bz2
minetest-0b23253447623cadf1c394984ce0eee977d54b9b.zip
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.
Diffstat (limited to 'src/mapgen/mapgen.h')
-rw-r--r--src/mapgen/mapgen.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapgen/mapgen.h b/src/mapgen/mapgen.h
index abac79016..b60aea57e 100644
--- a/src/mapgen/mapgen.h
+++ b/src/mapgen/mapgen.h
@@ -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;