From 6fa85a3a0c797b0961fc4bbbd581f8be1316aba7 Mon Sep 17 00:00:00 2001 From: epCode Date: Tue, 25 Oct 2022 19:18:08 +0000 Subject: [PATCH] fix passive mobs twisting their heads unnaturally --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 77740a548..3a79fc8ce 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -4102,9 +4102,9 @@ local mob_step = function(self, dtime) local mob_yaw = math.deg(-(-(self_rot.y)-(-minetest.dir_to_yaw(direction_player))))+self.head_yaw_offset local mob_pitch = math.deg(-dir_to_pitch(direction_player))*self.head_pitch_multiplier - if (mob_yaw < -60 or mob_yaw > 60) and not (self.attack and self.state == "attack") then + if (mob_yaw < -60 or mob_yaw > 60) and not (self.attack and self.state == "attack" and not self.runaway) then final_rotation = vector.multiply(oldr, 0.9) - elseif self.attack and self.state == "attack" then + elseif self.attack and self.state == "attack" and not self.runaway then if self.head_yaw == "y" then final_rotation = vector.new(mob_pitch, mob_yaw, 0) elseif self.head_yaw == "z" then