From 14e7fea6c2ab7bedb92f46bc7559b3e6c5093735 Mon Sep 17 00:00:00 2001 From: epCode Date: Wed, 19 Oct 2022 21:30:03 +0000 Subject: [PATCH 1/2] Make mob walk velocity be more normal fixes: #2819 --- mods/ENTITIES/mcl_mobs/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 58cb72f9a..f92e6555a 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3931,7 +3931,7 @@ local mob_step = function(self, dtime) if not self.animation.walk_speed then self.animation.walk_speed = 25 end - self.object:set_animation_frame_speed((v2/self.walk_velocity)*self.animation.walk_speed*self.frame_speed_multiplier) + self.object:set_animation_frame_speed((v2/self.run_velocity)*self.animation.walk_speed*self.frame_speed_multiplier) end --set_speed From 3ae3bc7f4ed19c3cf49659a8f13d1aabf9c3c9e0 Mon Sep 17 00:00:00 2001 From: epCode Date: Thu, 20 Oct 2022 03:23:41 +0000 Subject: [PATCH 2/2] fix non-moving entities having no animations --- mods/ENTITIES/mcl_mobs/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index f92e6555a..7102e3d3d 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3931,7 +3931,7 @@ local mob_step = function(self, dtime) if not self.animation.walk_speed then self.animation.walk_speed = 25 end - self.object:set_animation_frame_speed((v2/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) end --set_speed