diff options
author | Paramat <paramat@users.noreply.github.com> | 2018-04-06 00:10:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 00:10:16 +0100 |
commit | 7e3f88f539109955b21a129e4203a1cadb913483 (patch) | |
tree | 8663653a32d322e7678f62068792bc1aa5725464 /src/mapgen | |
parent | 5701f9e3898e5729e1602bb711af35603c67a964 (diff) | |
download | minetest-7e3f88f539109955b21a129e4203a1cadb913483.tar.gz minetest-7e3f88f539109955b21a129e4203a1cadb913483.tar.bz2 minetest-7e3f88f539109955b21a129e4203a1cadb913483.zip |
Mgcarpathian: Fix spawn level calculation (#7212)
Diffstat (limited to 'src/mapgen')
-rw-r--r-- | src/mapgen/mapgen_carpathian.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapgen/mapgen_carpathian.cpp b/src/mapgen/mapgen_carpathian.cpp index 76c215d00..24f570b64 100644 --- a/src/mapgen/mapgen_carpathian.cpp +++ b/src/mapgen/mapgen_carpathian.cpp @@ -341,15 +341,15 @@ float MapgenCarpathian::terrainLevelAtPoint(s16 x, s16 z) // Rolling hills float hill_mnt = hilliness * std::pow(n_hills, 2.f); - float hills = std::pow(hter, 3.f) * hill_mnt; + float hills = std::pow(std::fabs(hter), 3.f) * hill_mnt; // Ridged mountains float ridge_mnt = hilliness * (1.f - std::fabs(n_ridge_mnt)); - float ridged_mountains = std::pow(rter, 3.f) * ridge_mnt; + float ridged_mountains = std::pow(std::fabs(rter), 3.f) * ridge_mnt; // Step (terraced) mountains float step_mnt = hilliness * getSteps(n_step_mnt); - float step_mountains = std::pow(ster, 3.f) * step_mnt; + float step_mountains = std::pow(std::fabs(ster), 3.f) * step_mnt; // Final terrain level float mountains = hills + ridged_mountains + step_mountains; |