From 5ee1bd03737d0eef4f7d880b2e7e4e3dbef880a2 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 18 May 2024 11:49:11 +0000 Subject: [PATCH] Ensure fire always ages --- mods/ITEMS/mcl_fire/init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index b96b8847d..2e9bf8cb7 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -407,24 +407,24 @@ else -- Fire enabled chance = 12, catch_up = false, action = function(pos) + local node = minetest.get_node(pos) + local age = node.param2 + local p = get_ignitable(pos) if p then - local node = minetest.get_node(pos) - local age = node.param2 - -- Spawn new fire with an age based on this node's age spawn_fire(p, age+math.random(3,7)) shuffle_table(adjacents) - - -- Age the source fire - age = age + math.random(2,5) - node.param2 = age - if age >= 255 then - node.name = "air" - node.param2 = 0 - end - minetest.set_node(pos, node) end + + -- Always age the source fire + age = age + math.random(2,5) + node.param2 = age + if age >= 255 then + node.name = "air" + node.param2 = 0 + end + minetest.set_node(pos, node) end })