summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.h
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-06-23 21:49:26 +0100
committerSmallJoker <mk939@ymail.com>2018-06-03 17:31:59 +0200
commit6e0557e20c7347f2196c8c76f84d647f8699ec78 (patch)
treea9432d18b010c1226e4fa9441f841d7da5a4da46 /src/mapgen_v7.h
parent0c91c65a1147049a0a97ef3120a025401f60c5d7 (diff)
downloadminetest-6e0557e20c7347f2196c8c76f84d647f8699ec78.tar.gz
minetest-6e0557e20c7347f2196c8c76f84d647f8699ec78.tar.bz2
minetest-6e0557e20c7347f2196c8c76f84d647f8699ec78.zip
Mgv7: Avoid divide-by-zero errors
Some settings of paramters can cause mgv7 variables to be -inf, nan or -nan. This can cause massive vertical columns of water to appear above sea level.
Diffstat (limited to 'src/mapgen_v7.h')
-rw-r--r--src/mapgen_v7.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mapgen_v7.h b/src/mapgen_v7.h
index a69170057..2b79cce51 100644
--- a/src/mapgen_v7.h
+++ b/src/mapgen_v7.h
@@ -103,6 +103,8 @@ private:
Noise *noise_float_base_height;
Noise *noise_mountain;
Noise *noise_ridge;
+
+ float float_mount_height_lim;
};
#endif