From 063325082dca076acc89fe08f14eeb74b790ae6b Mon Sep 17 00:00:00 2001 From: epCode Date: Sun, 23 Oct 2022 21:23:50 +0000 Subject: [PATCH] undelcared global yaw in mob api fix Fixes #2839 --- 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 e1192c37aa..48f1517bb8 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3525,7 +3525,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) -- if skittish then run away if hitter and is_player and hitter:get_pos() and not die and self.runaway == true and self.state ~= "flop" then - yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) + local yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) minetest.after(0.2,function() if self and self.object and self.object:get_pos() and hitter and is_player and hitter:get_pos() then yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos())))