Skip to content

Commit

Permalink
Item Entity: prevent moveresult assert when attached (#13353)
Browse files Browse the repository at this point in the history
  • Loading branch information
mazes-80 committed Jun 5, 2023
1 parent e5a5d5a commit 23f7aab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/game/item_entity.lua
Expand Up @@ -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
Expand Down

0 comments on commit 23f7aab

Please sign in to comment.