mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Enable item physics right when out of magnet range
This commit is contained in:
parent
b153104d24
commit
817def7d81
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
if not collected then
|
if not collected then
|
||||||
if object:get_luaentity()._magnet_timer > 1 then
|
if object:get_luaentity()._magnet_timer > 1 then
|
||||||
object:get_luaentity()._magnet_timer = -item_drop_settings.magnet_time
|
object:get_luaentity()._magnet_timer = -item_drop_settings.magnet_time
|
||||||
|
enable_physics(object, object:get_luaentity())
|
||||||
elseif object:get_luaentity()._magnet_timer < 0 then
|
elseif object:get_luaentity()._magnet_timer < 0 then
|
||||||
object:get_luaentity()._magnet_timer = object:get_luaentity()._magnet_timer + dtime
|
object:get_luaentity()._magnet_timer = object:get_luaentity()._magnet_timer + dtime
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue