mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Re-enable item physic after player follow failed
This commit is contained in:
parent
467baaf67c
commit
64c91afa4a
1 changed files with 5 additions and 0 deletions
|
@ -392,6 +392,11 @@ core.register_entity(":__builtin:item", {
|
|||
-- If no collector was found for a long enough time, declare the magnet as disabled
|
||||
if self._magnet_active and (self._collector_timer == nil or (self._collector_timer > item_drop_settings.magnet_time)) then
|
||||
self._magnet_active = false
|
||||
self.object:setvelocity({x=0,y=0,z=0})
|
||||
self.object:setacceleration({x = 0, y = -get_gravity(), z = 0})
|
||||
self.physical_state = true
|
||||
self.object:set_properties({physical = true})
|
||||
return
|
||||
end
|
||||
if in_unloaded and self.physical_state == true then
|
||||
-- Don't infinetly fall into unloaded map
|
||||
|
|
Loading…
Reference in a new issue