Don't trigger lightning if mods disable auto at init.

This commit is contained in:
Auke Kok 2016-03-10 16:08:42 -08:00
parent 0cdcb34d6b
commit 7ba1adae2b

View File

@ -198,7 +198,10 @@ minetest.register_node("lightning:dying_flame", {
end,
})
if lightning.auto then
minetest.after(rng:next(lightning.interval_low, lightning.interval_high), lightning.strike)
end
-- if other mods disable auto lightning during initialization, don't trigger the first lightning.
minetest.after(5, function(dtime)
if lightning.auto then
minetest.after(rng:next(lightning.interval_low,
lightning.interval_high), lightning.strike)
end
end)