From 23f7aab354f52fa67578cf8ebbbf7fa06da1068e Mon Sep 17 00:00:00 2001 From: mazes-80 <1608580+mazes-80@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:00:11 +0200 Subject: [PATCH] Item Entity: prevent moveresult assert when attached (#13353) --- builtin/game/item_entity.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua index 1ca16a632..624fd4b11 100644 --- a/builtin/game/item_entity.lua +++ b/builtin/game/item_entity.lua @@ -178,6 +178,11 @@ core.register_entity(":__builtin:item", { return end + -- Prevent assert when item_entity is attached + if moveresult == nil and self.object:get_attach() then + return + end + if self.force_out then -- This code runs after the entity got a push from the is_stuck code. -- It makes sure the entity is entirely outside the solid node