From 97091de67f2f346ac73502de0b627bac3bd121d4 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Mon, 13 Mar 2023 01:51:09 +0000 Subject: [PATCH] Log pos info only prior to crash --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++++ mods/ENTITIES/mcl_mobs/physics.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index dd8c7cb5e..355f40413 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -510,6 +510,10 @@ function mob_class:on_step(dtime) else warn_user_error () local pos = self.object:get_pos() + local node = minetest.get_node(pos) + if node and node.name == "ignore" then + minetest.log("warning", "Pos is ignored: " .. dump(pos)) + end log_error (dump(retVal), dump(pos), dump(self)) end else diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index b6149d2a9..673c08c8a 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -628,7 +628,7 @@ function mob_class:do_env_damage() -- 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)) + --minetest.log("warning", "Pos is ignored: " .. dump(pos)) end local sunlight = minetest.get_natural_light(pos, self.time_of_day)