Fix false loaded_areas update when click analyze
This commit is contained in:
parent
cd34499c3c
commit
0dce58e8e4
6
init.lua
6
init.lua
@ -893,7 +893,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if (do_create or do_apply or do_analyze or fields.add_np_profile or fields.np_profiles) then
|
||||
if fields.offset and fields.scale and fields.seed and fields.spread_x and fields.spread_y and fields.spread_z and fields.octaves and fields.persistence and fields.lacunarity then
|
||||
|
||||
loaded_areas = {}
|
||||
local offset = tonumber(fields.offset)
|
||||
local scale = tonumber(fields.scale)
|
||||
local seed = tonumber(fields.seed)
|
||||
@ -986,6 +985,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if not px or not py or not pz or not size then
|
||||
return
|
||||
end
|
||||
if current_perlin.autogen then
|
||||
loaded_areas = {}
|
||||
end
|
||||
current_perlin.size = size
|
||||
local place_pos = vector.new(px, py, pz)
|
||||
local msg = S("Creating Perlin noise, please wait …")
|
||||
@ -996,6 +998,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
elseif msg == false then
|
||||
minetest.log("error", "[perlin_explorer] Error generating Perlin noise nodes!")
|
||||
end
|
||||
elseif do_apply and current_perlin.autogen then
|
||||
loaded_areas = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user