mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 22:02:26 +01:00
Fix missing division for dropped item velocity calculation
This commit is contained in:
parent
7afe3723e4
commit
92d68aa48a
4
init.lua
4
init.lua
@ -223,12 +223,12 @@ and not minetest.settings:get_bool("creative_mode") then
|
|||||||
if x >= 0 then
|
if x >= 0 then
|
||||||
x = x+1
|
x = x+1
|
||||||
end
|
end
|
||||||
vel.x = x
|
vel.x = 1 / x
|
||||||
local z = math.random(-5, 4)
|
local z = math.random(-5, 4)
|
||||||
if z >= 0 then
|
if z >= 0 then
|
||||||
z = z+1
|
z = z+1
|
||||||
end
|
end
|
||||||
vel.z = z
|
vel.z = 1 / z
|
||||||
obj:setvelocity(vel)
|
obj:setvelocity(vel)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user