1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-01-23 16:00:16 +01:00

disable follow_stop

This commit is contained in:
tenplus1 2024-10-19 15:06:59 +01:00
parent f746f4b1e0
commit 79fb4f7ead

10
api.lua
View File

@ -1351,8 +1351,8 @@ function mob_class:breed()
if not self.object:get_luaentity() then return end if not self.object:get_luaentity() then return end
-- reset parent movement -- reset parent movement
self.follow_stop = false -- self.follow_stop = false
ent.follow_stop = false -- ent.follow_stop = false
-- custom breed function -- custom breed function
if self.on_breed then if self.on_breed then
@ -1990,13 +1990,13 @@ function mob_class:follow_flop()
if dist >= self.reach and self.order ~= "stand" then if dist >= self.reach and self.order ~= "stand" then
self:set_velocity(self.walk_velocity) self:set_velocity(self.walk_velocity)
self.follow_stop = nil -- self.follow_stop = nil
if self.walk_chance ~= 0 then self:set_animation("walk") end if self.walk_chance ~= 0 then self:set_animation("walk") end
else else
self:set_velocity(0) self:set_velocity(0)
self:set_animation("stand") self:set_animation("stand")
self.follow_stop = true -- self.follow_stop = true
end end
return return
@ -2110,7 +2110,7 @@ function mob_class:do_states(dtime)
end end
end end
if self.state == "stand" and not self.follow_stop then if self.state == "stand" then -- and not self.follow_stop then
if self.randomly_turn and random(4) == 1 then if self.randomly_turn and random(4) == 1 then