mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 12:01:06 +01:00
don't disable physics if you've already disabled it
This commit is contained in:
parent
65fc5b6f28
commit
eeace260fe
1 changed files with 2 additions and 1 deletions
|
@ -645,7 +645,8 @@ minetest.register_entity(":__builtin:item", {
|
||||||
local is_floating = (is_stationary
|
local is_floating = (is_stationary
|
||||||
and is_in_water
|
and is_in_water
|
||||||
and (minetest.get_item_group(nn_above, "liquid") == 0))
|
and (minetest.get_item_group(nn_above, "liquid") == 0))
|
||||||
if is_floating then
|
|
||||||
|
if is_floating and self.physical_state == true then
|
||||||
self.object:set_velocity({x = 0, y = 0, z = 0})
|
self.object:set_velocity({x = 0, y = 0, z = 0})
|
||||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
||||||
disable_physics(self.object, self)
|
disable_physics(self.object, self)
|
||||||
|
|
Loading…
Reference in a new issue