Mgv7: Lower base of mountain generation to -112 and define constant
authorparamat <mat.gregory@virginmedia.com>
Fri, 3 Jul 2015 21:47:31 +0000 (22:47 +0100)
committerparamat <mat.gregory@virginmedia.com>
Sat, 4 Jul 2015 19:21:19 +0000 (20:21 +0100)
src/mapgen_v7.cpp
src/mapgen_v7.h

index 7fe5a3848a3111ff2ce0f3e7e6da67a523179e33..a111256a49c5cc01d21df693e8d0d5807c4d6609 100644 (file)
@@ -363,7 +363,7 @@ void MapgenV7::calculateNoise()
                noise_ridge_uwater->perlinMap2D(x, z);
        }
 
-       if ((spflags & MGV7_MOUNTAINS) && node_max.Y >= 0) {
+       if ((spflags & MGV7_MOUNTAINS) && node_max.Y >= MOUNTAIN_BASE) {
                noise_mountain->perlinMap3D(x, y, z);
                noise_mount_height->perlinMap2D(x, z);
        }
@@ -536,7 +536,7 @@ int MapgenV7::generateBaseTerrain()
 
 int MapgenV7::generateMountainTerrain(int ymax)
 {
-       if (node_max.Y < 0)
+       if (node_max.Y < MOUNTAIN_BASE)
                return ymax;
 
        MapNode n_stone(c_stone);
index 0a8a8c876b2a191899977a7013a15d259af53b49..6fa1a0f1ccb44e34cdab45bd48444dcac4b1f012 100644 (file)
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "mapgen.h"
 
+#define MOUNTAIN_BASE -112
+
 /////////////////// Mapgen V7 flags
 #define MGV7_MOUNTAINS   0x01
 #define MGV7_RIDGES      0x02