forked from VoxeLibre/VoxeLibre
Ensure conditional doesn't mask bug crash issue
This commit is contained in:
parent
0dee7792f4
commit
ae7cfdff69
|
@ -625,6 +625,12 @@ function mob_class:do_env_damage()
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node then
|
if node then
|
||||||
if node.name ~= "ignore" then
|
if node.name ~= "ignore" then
|
||||||
|
-- put below code in this block if we can prove that unloaded maps are causing crash.
|
||||||
|
-- it should warn then error
|
||||||
|
else
|
||||||
|
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
|
end
|
||||||
|
|
||||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
||||||
|
|
||||||
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
||||||
|
@ -643,9 +649,7 @@ function mob_class:do_env_damage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local y_level = self.collisionbox[2]
|
local y_level = self.collisionbox[2]
|
||||||
|
|
Loading…
Reference in New Issue