mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-26 21:03:45 +01:00
Fix crash after item hit unloaded chunk
parent
4f51af2ebc
commit
7b075f5772
@ -398,12 +398,14 @@ core.register_entity(":__builtin:item", {
|
||||
self.object:set_properties({physical = true})
|
||||
return
|
||||
end
|
||||
if in_unloaded and self.physical_state == true then
|
||||
-- Don't infinetly fall into unloaded map
|
||||
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||
self.object:setacceleration({x = 0, y = 0, z = 0})
|
||||
self.physical_state = false
|
||||
self.object:set_properties({physical = false})
|
||||
if in_unloaded then
|
||||
if self.physical_state == true then
|
||||
-- Don't infinetly fall into unloaded map
|
||||
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||
self.object:setacceleration({x = 0, y = 0, z = 0})
|
||||
self.physical_state = false
|
||||
self.object:set_properties({physical = false})
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user