some npcs don't have heads???

This commit is contained in:
Lilian Jónsdóttir 2020-08-22 13:55:33 -07:00
parent fd4ae6c266
commit 968fb3b7af

View file

@ -419,7 +419,7 @@ local function isIgnoredNPC(npc)
else else
-- local fight = getFightFromSpawnedReference(obj.id) -- ! calling this hundreds of times is bad for performance lol -- local fight = getFightFromSpawnedReference(obj.id) -- ! calling this hundreds of times is bad for performance lol
-- if (fight or 0) > 70 then isHostile = true end -- if (fight or 0) > 70 then isHostile = true end
isVampire = obj.head.vampiric and true or false -- don't set a reference ... is bool even a reference type?? isVampire = obj.head and (obj.head.vampiric and true or false) or false
if obj.id:match("[Dd]ead") or obj.name:match("[Dd]ead") then isDead = true end if obj.id:match("[Dd]ead") or obj.name:match("[Dd]ead") then isDead = true end
end end