From c209537cfe5a111ba88581c301b289e5d1d4f33b Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Thu, 26 Jan 2023 22:08:50 +0000 Subject: [PATCH] Make it a bit less chatty for logging --- mods/ENTITIES/mcl_mobs/api.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 531673609..9f47de185 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -340,16 +340,17 @@ function mob_class:outside_limits() local posy = math.abs(pos.y) local posz = math.abs(pos.z) if posx > MAPGEN_MOB_LIMIT or posy > MAPGEN_MOB_LIMIT or posz > MAPGEN_MOB_LIMIT then - minetest.log("action", "Getting close to limits of worldgen: " .. minetest.pos_to_string(pos)) + --minetest.log("action", "Getting close to limits of worldgen: " .. minetest.pos_to_string(pos)) if posx > MAPGEN_LIMIT or posy > MAPGEN_LIMIT or posz > MAPGEN_LIMIT then minetest.log("action", "Warning mob past limits of worldgen: " .. minetest.pos_to_string(pos)) else - minetest.log("action", "Warning mob close to limits of worldgen: " .. minetest.pos_to_string(pos)) - self.state = "stand" - self:set_animation( "stand") - - self.object:set_acceleration(vector.zero()) - self.object:set_velocity(vector.zero()) + if self.state ~= "stand" then + minetest.log("action", "Warning mob close to limits of worldgen: " .. minetest.pos_to_string(pos)) + self.state = "stand" + self:set_animation("stand") + self.object:set_acceleration(vector.zero()) + self.object:set_velocity(vector.zero()) + end end return true end