Skip to content

Commit

Permalink
MapgenValleys: Fixed submarine valleys shape
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelysam authored and paramat committed Mar 3, 2018
1 parent ebbd158 commit b952d42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mapgen/mapgen_valleys.cpp
Expand Up @@ -40,6 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mg_decoration.h"
#include "mapgen_valleys.h"
#include "cavegen.h"
#include <cmath>


//#undef NDEBUG
Expand Down Expand Up @@ -373,7 +374,7 @@ float MapgenValleys::terrainLevelFromNoise(TerrainNoise *tn)
// (here x = "river" and a = valley_profile).
// "valley" represents the height of the terrain, from the rivers.
{
float t = river / tn->valley_profile;
float t = std::fmax(river / tn->valley_profile, 0.0f);
*tn->valley = valley_d * (1.f - exp(- MYSQUARE(t)));
}

Expand Down

0 comments on commit b952d42

Please sign in to comment.