mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-03-20 11:10:18 +01:00
reset parent movement after baby born
This commit is contained in:
parent
5e67163d09
commit
407b2e7b56
8
api.lua
8
api.lua
@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20230328",
|
version = "20230331",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
@ -1505,12 +1505,16 @@ function mob_class:breed()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- reset parent movement
|
||||||
|
self.follow_stop = false
|
||||||
|
ent.follow_stop = false
|
||||||
|
|
||||||
-- custom breed function
|
-- custom breed function
|
||||||
if self.on_breed then
|
if self.on_breed then
|
||||||
|
|
||||||
-- when false skip going any further
|
-- when false skip going any further
|
||||||
if self:on_breed(ent) == false then
|
if self:on_breed(ent) == false then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
effect(pos, 15, "tnt_smoke.png", 1, 2, 2, 15, 5)
|
effect(pos, 15, "tnt_smoke.png", 1, 2, 2, 15, 5)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user