merge fix for misc error (fix misc error on boat contidional)
* recommit 58c2cb6d89bf5bfc3da8818842d081d847d92ecd after upgrade boats * sync merge with 5.2 stable brach from codeberg repo
This commit is contained in:
commit
f3d73386a2
@ -26,7 +26,7 @@ else
|
||||
end
|
||||
-- check for minetest 5.x compatibility
|
||||
is_50 = has_feature("httpfetch_binary_data")
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user