mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-03-28 15:00:30 +01:00
fix nil check for on_spawn
This commit is contained in:
parent
d290062a33
commit
81f99931fc
4
api.lua
4
api.lua
@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20230327",
|
version = "20230328",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
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 "
|
-- .. minetest.pos_to_string(pos) .. " on "
|
||||||
-- .. node.name .. " near " .. neighbors[1])
|
-- .. node.name .. " near " .. neighbors[1])
|
||||||
|
|
||||||
if on_spawn then
|
if on_spawn and mob then
|
||||||
on_spawn(mob:get_luaentity(), pos)
|
on_spawn(mob:get_luaentity(), pos)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user