From: Vanessa Ezekowitz Date: Sun, 27 Oct 2013 06:11:32 +0000 (-0400) Subject: fix incorrect assumpton about math.random() X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=c3e3f7ae38001fc0eeec8c20b65c4a3536998642;p=zefram%2Fminetest%2Fmoretrees.git fix incorrect assumpton about math.random() --- diff --git a/leafdecay.lua b/leafdecay.lua index f1b8021..f77f8dd 100644 --- a/leafdecay.lua +++ b/leafdecay.lua @@ -15,9 +15,9 @@ local process_drops = function(pos, name) for _,dropitem in ipairs(drops) do if dropitem ~= name then local newpos = { - x=pos.x + math.random(0, 0.5), - y=pos.y + math.random(0, 0.5), - z=pos.z + math.random(0, 0.5) + x=pos.x + math.random() - 0.5, + y=pos.y + math.random() - 0.5, + z=pos.z + math.random() - 0.5 } minetest.add_item(newpos, dropitem) end