From d583ccb986322fac20942626a985e4feb26d13d3 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Thu, 26 Jan 2023 22:01:41 +0000 Subject: [PATCH] Oooops, wrong number --- mods/CORE/mcl_util/init.lua | 2 +- mods/ENTITIES/mcl_mobs/api.lua | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index d55ec0430..5fe97850f 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -1,6 +1,6 @@ mcl_util = {} -local MAPGEN_LIMIT = 32000 +local MAPGEN_LIMIT = 31000 function mcl_util.get_mapgen_limit() return MAPGEN_LIMIT diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 1a7982ece..531673609 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -25,7 +25,8 @@ local mobs_debug = minetest.settings:get_bool("mobs_debug", false) -- Shows help local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true) local MAPGEN_LIMIT = mcl_util.get_mapgen_limit() -local MAPGEN_MOB_LIMIT = mcl_util.get_mapgen_limit() - 50 +local MAPGEN_MOB_LIMIT = mcl_util.get_mapgen_limit() - 100 +-- 30927 seems to be the edge of the world, so could be closer, but this is safer -- Peaceful mode message so players will know there are no monsters @@ -339,13 +340,16 @@ 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)) 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:set_velocity(0) self.state = "stand" self:set_animation( "stand") + + self.object:set_acceleration(vector.zero()) + self.object:set_velocity(vector.zero()) end return true end