forked from minetest-mods/item_drop
Add a hack to not collide with items all the time
This commit is contained in:
parent
d59ec60058
commit
72e2a2b294
8
init.lua
8
init.lua
@ -33,6 +33,10 @@ minetest.register_globalstep(function(dtime)
|
||||
vec.y = vec.y*3
|
||||
vec.z = vec.z*3
|
||||
object:setvelocity(vec)
|
||||
object:get_luaentity().physical_state = false
|
||||
object:get_luaentity().object:set_properties({
|
||||
physical = false
|
||||
})
|
||||
|
||||
minetest.after(1, function(args)
|
||||
local lua = object:get_luaentity()
|
||||
@ -51,6 +55,10 @@ minetest.register_globalstep(function(dtime)
|
||||
object:remove()
|
||||
else
|
||||
object:setvelocity({x=0,y=0,z=0})
|
||||
bject:get_luaentity().physical_state = true
|
||||
object:get_luaentity().object:set_properties({
|
||||
physical = true
|
||||
})
|
||||
end
|
||||
end, {player, object})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user