mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 22:02:26 +01:00
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.y = vec.y*3
|
||||||
vec.z = vec.z*3
|
vec.z = vec.z*3
|
||||||
object:setvelocity(vec)
|
object:setvelocity(vec)
|
||||||
|
object:get_luaentity().physical_state = false
|
||||||
|
object:get_luaentity().object:set_properties({
|
||||||
|
physical = false
|
||||||
|
})
|
||||||
|
|
||||||
minetest.after(1, function(args)
|
minetest.after(1, function(args)
|
||||||
local lua = object:get_luaentity()
|
local lua = object:get_luaentity()
|
||||||
@ -51,6 +55,10 @@ minetest.register_globalstep(function(dtime)
|
|||||||
object:remove()
|
object:remove()
|
||||||
else
|
else
|
||||||
object:setvelocity({x=0,y=0,z=0})
|
object:setvelocity({x=0,y=0,z=0})
|
||||||
|
bject:get_luaentity().physical_state = true
|
||||||
|
object:get_luaentity().object:set_properties({
|
||||||
|
physical = true
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end, {player, object})
|
end, {player, object})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user