Mgv7: Remove range limits on mountain height to enable modification through .conf
authorparamat <mat.gregory@virginmedia.com>
Tue, 30 Dec 2014 22:43:15 +0000 (22:43 +0000)
committerkwolekr <kwolekr@minetest.net>
Thu, 1 Jan 2015 17:51:49 +0000 (12:51 -0500)
src/mapgen_v7.cpp

index d72874d04c04b6d79a9ec18facd18ac62afa630f..d9e9280066e1768e9e530d048cd0b4a471480d5b 100644 (file)
@@ -350,7 +350,7 @@ float MapgenV7::baseTerrainLevelFromMap(int index)
 bool MapgenV7::getMountainTerrainAtPoint(int x, int y, int z)
 {
        float mnt_h_n = NoisePerlin2D(&noise_mount_height->np, x, z, seed);
-       float height_modifier = -((float)y / rangelim(mnt_h_n, 80.0, 150.0));
+       float height_modifier = -((float)y / mnt_h_n);
        float mnt_n = NoisePerlin3D(&noise_mountain->np, x, y, z, seed);
 
        return mnt_n + height_modifier >= 0.6;
@@ -360,7 +360,7 @@ bool MapgenV7::getMountainTerrainAtPoint(int x, int y, int z)
 bool MapgenV7::getMountainTerrainFromMap(int idx_xyz, int idx_xz, int y)
 {
        float mounthn = noise_mount_height->result[idx_xz];
-       float height_modifier = -((float)y / rangelim(mounthn, 80.0, 150.0));
+       float height_modifier = -((float)y / mounthn);
        return (noise_mountain->result[idx_xyz] + height_modifier >= 0.6);
 }