I'm going insane

This commit is contained in:
ElCeejo 2022-10-24 17:04:33 -07:00 committed by GitHub
parent 00cb41aec9
commit e4b8396be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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