Make it a bit less chatty for logging

This commit is contained in:
ancientmarinerdev 2023-01-26 22:08:50 +00:00 committed by Gitea
parent d583ccb986
commit c209537cfe
1 changed files with 8 additions and 7 deletions

View File

@ -340,16 +340,17 @@ function mob_class:outside_limits()
local posy = math.abs(pos.y) local posy = math.abs(pos.y)
local posz = math.abs(pos.z) local posz = math.abs(pos.z)
if posx > MAPGEN_MOB_LIMIT or posy > MAPGEN_MOB_LIMIT or posz > MAPGEN_MOB_LIMIT then 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 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)) minetest.log("action", "Warning mob past limits of worldgen: " .. minetest.pos_to_string(pos))
else else
minetest.log("action", "Warning mob close to limits of worldgen: " .. minetest.pos_to_string(pos)) if self.state ~= "stand" then
self.state = "stand" minetest.log("action", "Warning mob close to limits of worldgen: " .. minetest.pos_to_string(pos))
self:set_animation( "stand") self.state = "stand"
self:set_animation("stand")
self.object:set_acceleration(vector.zero()) self.object:set_acceleration(vector.zero())
self.object:set_velocity(vector.zero()) self.object:set_velocity(vector.zero())
end
end end
return true return true
end end