Log where map unloaded before light damage code. #3430 debugging
parent
583d066587
commit
0dee7792f4
|
@ -622,9 +622,11 @@ function mob_class:do_env_damage()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
if node then
|
||||||
|
if node.name ~= "ignore" then
|
||||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
||||||
|
|
||||||
-- 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
|
||||||
if self:deal_light_damage(pos, self.light_damage) then
|
if self:deal_light_damage(pos, self.light_damage) then
|
||||||
return true
|
return true
|
||||||
|
@ -641,6 +643,10 @@ function mob_class:do_env_damage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local y_level = self.collisionbox[2]
|
local y_level = self.collisionbox[2]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue