From ed8d79395d4bb4641132c402d3360ae95b8cf1f1 Mon Sep 17 00:00:00 2001 From: kay27 Date: Mon, 21 Jun 2021 02:44:55 +0400 Subject: [PATCH] [mcl_mobs/api] Fix critical attempt to index local pos2 (a nil value) --- mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua index cea6d838b2..ce3f1b73ad 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua @@ -125,6 +125,9 @@ mobs.set_yaw_while_attacking = function(self) pos1.y = 0 local pos2 = self.attacking:get_pos() + if not pos2 then + return + end pos2.y = 0 local new_direction = vector_direction(pos1,pos2)