mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -192,7 +192,12 @@ BiomeGenOriginal::BiomeGenOriginal(BiomeManager *biomemgr,
|
||||
|
||||
heatmap = noise_heat->result;
|
||||
humidmap = noise_humidity->result;
|
||||
|
||||
biomemap = new biome_t[m_csize.X * m_csize.Z];
|
||||
// Initialise with the ID of the default biome so that cavegen can get
|
||||
// biomes when biome generation (which calculates the biomemap IDs) is
|
||||
// disabled.
|
||||
memset(biomemap, 0, sizeof(biome_t) * m_csize.X * m_csize.Z);
|
||||
}
|
||||
|
||||
BiomeGenOriginal::~BiomeGenOriginal()
|
||||
|
Reference in New Issue
Block a user