1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Mgv7: Add 'mount_zero_level' parameter

Allows setting of the mountain 'zero level' (y where density gradient is zero).

It is easy to vertically shift smooth terrain by editing noise parameter 'offset',
but vertically shifting mountain terrain was complex and imprecise, involving
making a calculation based on an average of the mountain height parameter.
This commit is contained in:
paramat
2017-07-24 22:50:42 +01:00
committed by paramat
parent 31b84ce1f2
commit f61928d3fc
4 changed files with 14 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ extern FlagDesc flagdesc_mapgen_v7[];
struct MapgenV7Params : public MapgenParams {
u32 spflags = MGV7_MOUNTAINS | MGV7_RIDGES |
MGV7_CAVERNS | MGV7_BIOMEREPEAT;
s16 mount_zero_level = 0;
float cave_width = 0.09f;
s16 large_cave_depth = -33;
s16 lava_depth = -256;
@@ -92,6 +93,7 @@ public:
void generateRidgeTerrain();
private:
s16 mount_zero_level;
s16 large_cave_depth;
float float_mount_density;
float float_mount_height;