1
0

Fix potential freeze in core.check_for_falling

This commit is contained in:
savilli 2023-08-27 20:12:53 +02:00 committed by mckaygerhard
parent fbdf65c57b
commit 9866b07654

View File

@ -513,16 +513,16 @@ function core.check_single_for_falling(p)
if same and d_bottom.paramtype2 == "leveled" and
core.get_node_level(p_bottom) <
core.get_node_max_level(p_bottom) then
convert_to_falling_node(p, n)
return true
local success = convert_to_falling_node(p, n)
return success
end
-- Otherwise only if the bottom node is considered "fall through"
if not same and
(not d_bottom.walkable or d_bottom.buildable_to) and
(core.get_item_group(n.name, "float") == 0 or
d_bottom.liquidtype == "none") then
convert_to_falling_node(p, n)
return true
local success = convert_to_falling_node(p, n)
return success
end
end
end