From e4b8396be9f26569f7a178737f1b8328dca9a90e Mon Sep 17 00:00:00 2001 From: ElCeejo <40281901+ElCeejo@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:04:33 -0700 Subject: [PATCH] I'm going insane --- mobs/wolf.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobs/wolf.lua b/mobs/wolf.lua index f35994c..209af17 100644 --- a/mobs/wolf.lua +++ b/mobs/wolf.lua @@ -236,14 +236,15 @@ creatura.register_mob("animalia:wolf", { end, deactivate_func = function(self) if self.owner then - for i, object in ipairs(animalia.pets[self.owner]) do + for i, object in ipairs(animalia.pets[self.owner] or {}) do if object == self.object then animalia.pets[self.owner][i] = nil end end end if self.enemies - and self.enemies[1] then + and self.enemies[1] + and self.memorize then self.enemies[1] = nil self.enemies = self:memorize("enemies", self.enemies) end