Change order of mob step

This commit is contained in:
ancientmarinerdev 2023-01-23 01:03:13 +00:00 committed by Gitea
parent 6bbf3af97b
commit 15560d969c

View file

@ -340,26 +340,22 @@ function mob_class:on_step(dtime)
-- Do we abandon out of here now? -- Do we abandon out of here now?
end end
-- Start: This code logically should be moved to after the die check
if self:falling(pos) then return end if self:falling(pos) then return end
self:check_suspend() self:check_suspend()
self:check_water_flow()
self:env_danger_movement_checks (dtime)
-- End: This code logically should be moved to after the die check
if not self.fire_resistant then if not self.fire_resistant then
mcl_burning.tick(self.object, dtime, self) mcl_burning.tick(self.object, dtime, self)
-- mcl_burning.tick may remove object immediately -- mcl_burning.tick may remove object immediately
if not self.object:get_pos() then return end if not self.object:get_pos() then return end
end end
-- Move to after die check?
if mobs_debug then self:update_tag() end
if self.state == "die" then return end if self.state == "die" then return end
self:check_water_flow()
self:env_danger_movement_checks (dtime)
if mobs_debug then self:update_tag() end
self:follow_flop() -- Mob following code. self:follow_flop() -- Mob following code.
self:set_animation_speed() -- set animation speed relitive to velocity self:set_animation_speed() -- set animation speed relitive to velocity