Skip to content

Commit

Permalink
Mgv7: Lower base of mountain generation to -112 and define constant
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Jul 4, 2015
1 parent 64dc053 commit d786a27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mapgen_v7.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/mapgen_v7.h
Expand Up @@ -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
Expand Down

0 comments on commit d786a27

Please sign in to comment.