Merge remote-tracking branch 'origin/master' into portals

This commit is contained in:
kay27 2021-03-17 16:40:19 +04:00
commit 574c38c768
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,7 @@ minetest.register_on_mods_loaded(function()
end end
end end
for _,func in ipairs(walkover.registered_globals) do --cache registered globals for _,func in ipairs(walkover.registered_globals) do --cache registered globals
table.insert(registered_globals, value) table.insert(registered_globals, func)
end end
end) end)

View File

@ -1047,7 +1047,10 @@ local do_env_damage = function(self)
end end
end end
local sunlight = minetest.get_natural_light(pos, self.time_of_day) -- Use get_node_light for Minetest version 5.3 where get_natural_light
-- does not exist yet.
local get_light = minetest.get_natural_light or minetest.get_node_light
local sunlight = get_light(pos, self.time_of_day)
-- bright light harms mob -- bright light harms mob
if self.light_damage ~= 0 and (sunlight or 0) > 12 then if self.light_damage ~= 0 and (sunlight or 0) > 12 then