mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-20 03:35:18 +02:00
Map generation limit: Make per-world
The setting limits map generation but affects nothing else. Add 'mapgen_limit' to global mapgen parameters. Move 'blockpos_over_mapgen_limit()' to the only place it is called from: map.cpp. Allow teleportation to any part of the world even if over the set mapgen limit. Simplify the reading of this limit in mgvalleys. Remove the 'map_generation_limit' setting.
This commit is contained in:
@@ -124,6 +124,7 @@ struct MapgenParams {
|
||||
s16 chunksize;
|
||||
u64 seed;
|
||||
s16 water_level;
|
||||
s16 mapgen_limit;
|
||||
u32 flags;
|
||||
|
||||
BiomeParams *bparams;
|
||||
@@ -133,6 +134,7 @@ struct MapgenParams {
|
||||
chunksize(5),
|
||||
seed(0),
|
||||
water_level(1),
|
||||
mapgen_limit(MAX_MAP_GENERATION_LIMIT),
|
||||
flags(MG_CAVES | MG_LIGHT | MG_DECORATIONS),
|
||||
bparams(NULL)
|
||||
{
|
||||
@@ -158,6 +160,7 @@ class Mapgen {
|
||||
public:
|
||||
s32 seed;
|
||||
int water_level;
|
||||
int mapgen_limit;
|
||||
u32 flags;
|
||||
bool generating;
|
||||
int id;
|
||||
|
Reference in New Issue
Block a user