From d4fd40f123889effcae9460d57083efdd426a551 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 6 Feb 2015 21:41:40 +0100 Subject: [PATCH] Fix unintended assignment to global variable --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9216973..05d3511 100644 --- a/init.lua +++ b/init.lua @@ -142,7 +142,7 @@ minetest.register_on_generated(function(minp, maxp, seed) if noise1 > 0.25 or noise1 < -0.26 then local mpos = {x=math.random(minp.x,maxp.x), y=math.random(minp.y,maxp.y), z=math.random(minp.z,maxp.z)} - p2 = minetest.find_node_near(mpos, 25, {"default:desert_sand"}) + local p2 = minetest.find_node_near(mpos, 25, {"default:desert_sand"}) while p2 == nil and cnt < 5 do cnt = cnt+1 mpos = {x=math.random(minp.x,maxp.x), y=math.random(minp.y,maxp.y), z=math.random(minp.z,maxp.z)}