mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 23:31:05 +01:00
Don't collect item too early
This commit is contained in:
parent
b8df2d4e0a
commit
76f9ba70df
1 changed files with 4 additions and 6 deletions
|
@ -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 a new issue