projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a5a538
)
Fix threshold type
author
est31
<MTest31@outlook.com>
Mon, 7 Dec 2015 08:42:39 +0000
(09:42 +0100)
committer
est31
<MTest31@outlook.com>
Mon, 7 Dec 2015 08:57:45 +0000
(09:57 +0100)
Fix the type of the threshold value for mapgen.
The commit
a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4
"Fix spelling of noise_threshold"
has changed it to be read as int, but it can have non-integral values too.
Thanks to @kwolekr for pointing this out.
src/script/lua_api/l_mapgen.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_mapgen.cpp
b/src/script/lua_api/l_mapgen.cpp
index b29fd96ca9fa6976e4527e383092831336c1862b..fb839176b8d71d71e187897574568791f5ad87a2 100644
(file)
--- a/
src/script/lua_api/l_mapgen.cpp
+++ b/
src/script/lua_api/l_mapgen.cpp
@@
-951,9
+951,9
@@
int ModApiMapgen::l_register_ore(lua_State *L)
warn_if_field_exists(L, index, "noise_threshhold",
"Deprecated: new name is \"noise_threshold\".");
-
in
t nthresh;
- if (!get
in
tfield(L, index, "noise_threshold", nthresh) &&
-
!getin
tfield(L, index, "noise_threshhold", nthresh))
+
floa
t nthresh;
+ if (!get
floa
tfield(L, index, "noise_threshold", nthresh) &&
+
!getfloa
tfield(L, index, "noise_threshhold", nthresh))
nthresh = 0;
ore->nthresh = nthresh;