fix eternally falling items for item drop

master
Juraj Vajda 2016-10-13 23:00:30 +02:00
parent de374bce47
commit b45c02aed7
1 changed files with 7 additions and 0 deletions

View File

@ -68,6 +68,7 @@ function pick_dropped_items(player)
vec.y = pos2.y + vec.y
vec.z = pos2.z + vec.z
object:moveto(vec)
object:get_luaentity().physical_state = false
object:get_luaentity().object:set_properties({
physical = false
@ -76,6 +77,12 @@ function pick_dropped_items(player)
object:setacceleration({x=0, y=0, z=0})
object:setvelocity({x=0, y=0, z=0})
--fix eternally falling items
minetest.after(0, function()
object:setacceleration({x=0, y=0, z=0})
object:setvelocity({x=0, y=0, z=0})
end)
minetest.after(1, function(args)
local lua = object:get_luaentity()
if object == nil or lua == nil or lua.itemstring == nil then