Don't collect item too early
This commit is contained in:
parent
b8df2d4e0a
commit
76f9ba70df
|
@ -67,11 +67,10 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
--modified simplemobs api
|
||||
|
||||
local pos1 = checkpos
|
||||
local pos2 = object:getpos()
|
||||
local vec = vector.subtract(pos1, pos2)
|
||||
|
||||
vec = vector.add(pos2, vec)
|
||||
-- Move object to player
|
||||
local opos = object:getpos()
|
||||
local vec = vector.subtract(checkpos, opos)
|
||||
vec = vector.add(opos, vector.divide(vec, 2))
|
||||
object:moveto(vec)
|
||||
|
||||
object:get_luaentity().physical_state = false
|
||||
|
@ -79,7 +78,6 @@ minetest.register_globalstep(function(dtime)
|
|||
physical = false
|
||||
})
|
||||
|
||||
|
||||
--fix eternally falling items
|
||||
minetest.after(0, function(object)
|
||||
local lua = object:get_luaentity()
|
||||
|
|
Loading…
Reference in New Issue