1 Commits

Author SHA1 Message Date
06f337b23e Fix crash when trying to apply weather to dead players 2020-05-17 22:13:09 +02:00

View File

@ -90,6 +90,7 @@ function trigger.get_active_effects()
for _, player in ipairs(minetest.get_connected_players()) do for _, player in ipairs(minetest.get_connected_players()) do
local pname = player:get_player_name() local pname = player:get_player_name()
local env = environments[pname] local env = environments[pname]
if env ~= nil then
if is_weather_active(player, wname, env) then if is_weather_active(player, wname, env) then
if type(climate_mod.current_weather[pname]) == "nil" then if type(climate_mod.current_weather[pname]) == "nil" then
climate_mod.current_weather[pname] = {} climate_mod.current_weather[pname] = {}
@ -108,6 +109,7 @@ function trigger.get_active_effects()
end end
end end
end end
end
return effects return effects
end end