From 4b316923194506b4e897029900a259463f5cf0fa Mon Sep 17 00:00:00 2001 From: iliekprogrammar Date: Sun, 7 Aug 2022 12:09:12 +0800 Subject: [PATCH] [5.6][boats] fix unsafe entity handling this probably does not affect normal gameplay, unless you can set boats on fire somehow --- mods/ENTITIES/mcl_boats/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index cd8002b22..9775b8597 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -201,8 +201,9 @@ function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, d end function boat.on_step(self, dtime, moveresult) - -- ERROR: [#2523] THIS WILL CAUSE INVALID OBJECTREFS mcl_burning.tick(self.object, dtime, self) + -- mcl_burning.tick may remove object immediately + if not self.object:get_pos() then return end self._v = get_v(self.object:get_velocity()) * get_sign(self._v) local v_factor = 1