From 5846ab1cb907626897787191b2354b3817dd5f5d Mon Sep 17 00:00:00 2001 From: ElCeejo <40281901+ElCeejo@users.noreply.github.com> Date: Tue, 31 May 2022 14:07:50 -0700 Subject: [PATCH] Fix behavior issue --- mob_meta.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mob_meta.lua b/mob_meta.lua index f9e8569..9e2bd36 100644 --- a/mob_meta.lua +++ b/mob_meta.lua @@ -1155,13 +1155,16 @@ function mob:_execute_utilities() end end if loop_data.utility - and loop_data.args - and self._utility_data.args then - local no_data = not self._utility_data.utility and not self._utility_data.args - local new_util = self._utility_data.utility ~= loop_data.utility or not tbl_equals(self._utility_data.args, loop_data.args) - if no_data - or new_util then -- if utilities are different or utilities are the same and args are different set new data + and loop_data.args then + if not self._utility_data then self._utility_data = loop_data + else + local no_data = not self._utility_data.utility and not self._utility_data.args + local new_util = self._utility_data.utility ~= loop_data.utility or not tbl_equals(self._utility_data.args, loop_data.args) + if no_data + or new_util then -- if utilities are different or utilities are the same and args are different set new data + self._utility_data = loop_data + end end end if self._utility_data.utility then