diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-10-27 02:11:32 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-10-27 02:11:32 -0400 |
commit | c3e3f7ae38001fc0eeec8c20b65c4a3536998642 (patch) | |
tree | 16d7336c8dddf335400e781a49034883124f360b | |
parent | f3a8c29d1a06ffe520d424ae1a7dde8df282e851 (diff) |
fix incorrect assumpton about math.random()
-rw-r--r-- | leafdecay.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 |