lib/trigger: remove unrequired tests

This commit is contained in:
mazes-80 2022-09-20 05:46:12 +02:00
parent dd769dfdd0
commit e8f4048670

View File

@ -93,10 +93,8 @@ function trigger.get_active_effects()
local hp = player:get_hp() local hp = player:get_hp()
-- skip weather presets for dead players -- skip weather presets for dead players
if hp ~= nil and hp > 0 then if hp ~= nil and hp > 0 then
environments[pname] = trigger.get_player_environment(player) local env = trigger.get_player_environment(player)
end environments[pname] = env
local env = environments[pname]
if env ~= nil then
for wname, wconfig in pairs(climate_mod.weathers) do for wname, wconfig in pairs(climate_mod.weathers) do
if is_weather_active(player, wname, env) then if is_weather_active(player, wname, env) then
if climate_mod.current_weather[pname] == nil then if climate_mod.current_weather[pname] == nil then