From 852d6a7976d05e5ab58d6b8a685b1b488f914840 Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:12:53 +0200 Subject: [PATCH] Fix potential freeze in core.check_for_falling --- builtin/game/falling.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua index f9d71c90a..717c0b748 100644 --- a/builtin/game/falling.lua +++ b/builtin/game/falling.lua @@ -529,16 +529,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