mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Check map limits before get_natural_light
This commit is contained in:
parent
467ecc7c58
commit
df8c234def
1 changed files with 4 additions and 1 deletions
|
@ -1067,7 +1067,10 @@ local do_env_damage = function(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
local sunlight = 10
|
||||||
|
if within_limits(pos,0) then
|
||||||
|
sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
||||||
|
end
|
||||||
|
|
||||||
-- 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
|
||||||
|
|
Loading…
Reference in a new issue