1
0
Fork 0

Don't collect item too early

objects
Wuzzy 2017-06-03 17:36:43 +02:00
parent b8df2d4e0a
commit 76f9ba70df
1 changed files with 4 additions and 6 deletions

View File

@ -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()