Mgcarpathian: Fix spawn level calculation (#7212)

This commit is contained in:
Paramat 2018-04-06 00:10:16 +01:00 committed by GitHub
parent 5701f9e389
commit 7e3f88f539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -341,15 +341,15 @@ float MapgenCarpathian::terrainLevelAtPoint(s16 x, s16 z)
// Rolling hills // Rolling hills
float hill_mnt = hilliness * std::pow(n_hills, 2.f); 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 // Ridged mountains
float ridge_mnt = hilliness * (1.f - std::fabs(n_ridge_mnt)); 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 // Step (terraced) mountains
float step_mnt = hilliness * getSteps(n_step_mnt); 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 // Final terrain level
float mountains = hills + ridged_mountains + step_mountains; float mountains = hills + ridged_mountains + step_mountains;