When mobs stop, don't stop animations easier

fixes mob punch animation.
This commit is contained in:
epCode 2022-10-25 18:57:58 +00:00
parent 636e5545a7
commit de4c40f60a

View file

@ -4001,7 +4001,11 @@ local mob_step = function(self, dtime)
if not self.animation.walk_speed then if not self.animation.walk_speed then
self.animation.walk_speed = 25 self.animation.walk_speed = 25
end end
if abs(v.x)+abs(v.z) > 0.5 then
self.object:set_animation_frame_speed((v2/math.max(1,self.run_velocity))*self.animation.walk_speed*self.frame_speed_multiplier) self.object:set_animation_frame_speed((v2/math.max(1,self.run_velocity))*self.animation.walk_speed*self.frame_speed_multiplier)
else
self.object:set_animation_frame_speed(25)
end
end end
--set_speed --set_speed