forked from Mirrorlandia_minetest/minetest
Fix threshold type
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.
This commit is contained in:
parent
9a5a538e8d
commit
51e8c2b277
@ -951,9 +951,9 @@ int ModApiMapgen::l_register_ore(lua_State *L)
|
|||||||
warn_if_field_exists(L, index, "noise_threshhold",
|
warn_if_field_exists(L, index, "noise_threshhold",
|
||||||
"Deprecated: new name is \"noise_threshold\".");
|
"Deprecated: new name is \"noise_threshold\".");
|
||||||
|
|
||||||
int nthresh;
|
float nthresh;
|
||||||
if (!getintfield(L, index, "noise_threshold", nthresh) &&
|
if (!getfloatfield(L, index, "noise_threshold", nthresh) &&
|
||||||
!getintfield(L, index, "noise_threshhold", nthresh))
|
!getfloatfield(L, index, "noise_threshhold", nthresh))
|
||||||
nthresh = 0;
|
nthresh = 0;
|
||||||
ore->nthresh = nthresh;
|
ore->nthresh = nthresh;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user