forked from VoxeLibre/VoxeLibre
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
|
--modified simplemobs api
|
||||||
|
|
||||||
local pos1 = checkpos
|
-- Move object to player
|
||||||
local pos2 = object:getpos()
|
local opos = object:getpos()
|
||||||
local vec = vector.subtract(pos1, pos2)
|
local vec = vector.subtract(checkpos, opos)
|
||||||
|
vec = vector.add(opos, vector.divide(vec, 2))
|
||||||
vec = vector.add(pos2, vec)
|
|
||||||
object:moveto(vec)
|
object:moveto(vec)
|
||||||
|
|
||||||
object:get_luaentity().physical_state = false
|
object:get_luaentity().physical_state = false
|
||||||
|
@ -79,7 +78,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
physical = false
|
physical = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
--fix eternally falling items
|
--fix eternally falling items
|
||||||
minetest.after(0, function(object)
|
minetest.after(0, function(object)
|
||||||
local lua = object:get_luaentity()
|
local lua = object:get_luaentity()
|
||||||
|
|
Loading…
Reference in New Issue