special case for pets

This commit is contained in:
EmosewaMC 2022-04-06 22:21:08 -07:00
parent a0a9936e47
commit bd0926e0a5

View File

@ -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));
}