From fcff52f049edc2d138c89798728bd6af56027951 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 14 Apr 2022 20:40:09 -0400 Subject: [PATCH 1/2] Fix flammable item entities crashing * backported from https://github.com/minetest/minetest_game/pull/2659 * fix to close https://codeberg.org/minenux/minetest-game-minetest/issues/11 --- mods/default/item_entity.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/default/item_entity.lua b/mods/default/item_entity.lua index 3d1e274..8ed8835 100644 --- a/mods/default/item_entity.lua +++ b/mods/default/item_entity.lua @@ -15,8 +15,8 @@ local item = { burn_up = function(self) -- disappear in a smoke puff - self.object:remove() local p = self.object:get_pos() + self.object:remove() minetest.sound_play("default_item_smoke", { pos = p, max_hear_distance = 8, @@ -48,6 +48,10 @@ local item = { if self.ignite_timer > 10 then self.ignite_timer = 0 + local pos = self.object:get_pos() + if pos == nil then + return -- object already deleted + end local node = minetest.get_node_or_nil(self.object:get_pos()) if not node then return From 58c2cb6d89bf5bfc3da8818842d081d847d92ecd Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 14 Apr 2022 20:42:56 -0400 Subject: [PATCH 2/2] fix misc error on boat contidional --- mods/boats/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/boats/init.lua b/mods/boats/init.lua index 0129646..622d707 100644 --- a/mods/boats/init.lua +++ b/mods/boats/init.lua @@ -25,7 +25,7 @@ else end end -- check for minetest 5.x compatibility -is_53 = minetest.has_feature("direct_velocity_on_players") or minetest.has_feature("is_creative_enabled") of false +is_53 = minetest.has_feature("direct_velocity_on_players") or minetest.has_feature("is_creative_enabled") or false -- -- Helper functions