fixed lightning crash

This commit is contained in:
theFox6 2018-05-17 13:43:44 +02:00
parent ef480be291
commit 3ec25f8eee
1 changed files with 3 additions and 1 deletions

View File

@ -90,9 +90,11 @@ minetest.register_globalstep(function()
else else
if math.random(1, 10000) == 1 then if math.random(1, 10000) == 1 then
weather.type = "none" weather.type = "none"
if minetest.get_modpath("lightning") then
lightning.auto = false lightning.auto = false
end end
end end
end
local current_downfall = weather_mod.registered_downfalls[weather.type] local current_downfall = weather_mod.registered_downfalls[weather.type]
if current_downfall==nil then return end if current_downfall==nil then return end
for _, player in ipairs(minetest.get_connected_players()) do for _, player in ipairs(minetest.get_connected_players()) do