fix nil check for on_spawn

This commit is contained in:
tenplus1 2023-03-28 07:57:31 +01:00
parent d290062a33
commit 81f99931fc
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20230327",
version = "20230328",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -4018,7 +4018,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
-- .. minetest.pos_to_string(pos) .. " on "
-- .. node.name .. " near " .. neighbors[1])
if on_spawn then
if on_spawn and mob then
on_spawn(mob:get_luaentity(), pos)
end
else