mirror of
https://github.com/mt-mods/moretrees.git
synced 2024-12-25 18:20:22 +01:00
fix incorrect assumpton about math.random()
This commit is contained in:
parent
f3a8c29d1a
commit
c3e3f7ae38
@ -15,9 +15,9 @@ local process_drops = function(pos, name)
|
|||||||
for _,dropitem in ipairs(drops) do
|
for _,dropitem in ipairs(drops) do
|
||||||
if dropitem ~= name then
|
if dropitem ~= name then
|
||||||
local newpos = {
|
local newpos = {
|
||||||
x=pos.x + math.random(0, 0.5),
|
x=pos.x + math.random() - 0.5,
|
||||||
y=pos.y + math.random(0, 0.5),
|
y=pos.y + math.random() - 0.5,
|
||||||
z=pos.z + math.random(0, 0.5)
|
z=pos.z + math.random() - 0.5
|
||||||
}
|
}
|
||||||
minetest.add_item(newpos, dropitem)
|
minetest.add_item(newpos, dropitem)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user