mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Make error handling safe in case pos is missing
This commit is contained in:
parent
97091de67f
commit
be269b2034
@ -510,10 +510,12 @@ function mob_class:on_step(dtime)
|
|||||||
else
|
else
|
||||||
warn_user_error ()
|
warn_user_error ()
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
if pos then
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node and node.name == "ignore" then
|
if node and node.name == "ignore" then
|
||||||
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
log_error (dump(retVal), dump(pos), dump(self))
|
log_error (dump(retVal), dump(pos), dump(self))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user