From bd0926e0a5e67cf0585f7008066d1271d4b21669 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Wed, 6 Apr 2022 22:21:08 -0700 Subject: [PATCH] special case for pets --- dGame/Entity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 6515b9b4..bca7ffa2 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -231,7 +231,8 @@ void Entity::Initialize() m_Components.insert(std::make_pair(COMPONENT_TYPE_RACING_STATS, nullptr)); } - if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_ITEM) > 0) { + PetComponent* petComponent; + if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_ITEM) > 0 && !TryGetComponent(COMPONENT_TYPE_PET, petComponent)) { m_Components.insert(std::make_pair(COMPONENT_TYPE_ITEM, nullptr)); }