mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Fix some bugs WRT eternal fire spawning
This commit is contained in:
parent
5c5c2ea109
commit
02f46da152
1 changed files with 5 additions and 2 deletions
|
@ -379,8 +379,11 @@ local eternal_override = {
|
|||
_on_ignite = function(player, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(flame_pos).name == "air" then
|
||||
local fn = minetest.get_node(flame_pos)
|
||||
if fn.name == "air" and not minetest.is_protected(flame_pos, "fire") and pointed_thing.under.y < pointed_thing.above.y then
|
||||
minetest.set_node(flame_pos, {name = "mcl_fire:eternal_fire"})
|
||||
else
|
||||
mcl_fire.set_fire(pointed_thing)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
@ -393,7 +396,7 @@ end
|
|||
-- Set pointed_thing on (normal) fire
|
||||
mcl_fire.set_fire = function(pointed_thing)
|
||||
local n = minetest.get_node(pointed_thing.above)
|
||||
if n.name ~= "" and n.name == "air" and not minetest.is_protected(pointed_thing.above, "fire") then
|
||||
if n.name == "air" and not minetest.is_protected(pointed_thing.above, "fire") then
|
||||
minetest.add_node(pointed_thing.above, {name="mcl_fire:fire"})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue