From a886eff0569e42741101ace43fcf735e97112212 Mon Sep 17 00:00:00 2001 From: kay27 Date: Thu, 10 Feb 2022 02:22:58 +0400 Subject: [PATCH] #55 Fix next boats crash (If it's not an entity, what occupies them?) --- mods/ENTITIES/mcl_boats/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 3c49f5cf7..9ec06d870 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -112,7 +112,9 @@ local function detach_object(obj, change_pos) mcl_player.player_attached[obj:get_player_name()] = false mcl_player.player_set_animation(obj, "stand" , 30) else - obj:get_luaentity()._old_visual_size = nil + local luaentity = obj:get_luaentity() + if not luaentity then return end + luaentity._old_visual_size = nil end if change_pos then obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0)))