mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Re-organise mob_step for better clarity
This commit is contained in:
parent
f326fa620f
commit
952a90bfde
1 changed files with 8 additions and 7 deletions
|
@ -436,22 +436,23 @@ local function on_step_work (self, dtime)
|
||||||
self:do_jump()
|
self:do_jump()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:check_aggro(dtime)
|
|
||||||
|
|
||||||
self:check_particlespawners(dtime)
|
|
||||||
|
|
||||||
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
|
||||||
|
|
||||||
if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then
|
||||||
self:check_breeding()
|
|
||||||
|
|
||||||
if player_in_active_range then
|
if player_in_active_range then
|
||||||
self:check_item_pickup()
|
self:check_item_pickup()
|
||||||
self:set_armor_texture()
|
self:set_armor_texture()
|
||||||
self:step_opinion_sound(dtime)
|
self:step_opinion_sound(dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:check_breeding()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:check_aggro(dtime)
|
||||||
|
|
||||||
|
self:check_particlespawners(dtime)
|
||||||
|
|
||||||
|
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
||||||
|
|
||||||
if self:do_states(dtime, player_in_active_range) then return end
|
if self:do_states(dtime, player_in_active_range) then return end
|
||||||
|
|
||||||
if mobs_debug then self:update_tag() end
|
if mobs_debug then self:update_tag() end
|
||||||
|
|
Loading…
Reference in a new issue