add spawn check for collisionbox

* backported upstream commit d1f23e8ed848cbe0d7827c19285ff256a78fb6fe
This commit is contained in:
general 2024-04-07 22:04:49 -04:00
parent 81066c8b92
commit ae003fe323

View File

@ -33,7 +33,7 @@ local use_mc2 = minetest.get_modpath("mcl_core")
-- Global
mobs = {
mod = "redo",
version = "20231106",
version = "20231111",
translate = S, intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {},
node_ice = "default:ice",
@ -4216,6 +4216,11 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
local ent = minetest.registered_entities[name]
if not ent or not ent.base_colbox then
print("[MOBS] Error spawning mob: " .. name)
return
end
-- should we check mob area for obstructions ?
if mob_area_spawn ~= true then