Possessor and possessable additions (#619)

* possessor-fixup and possessable additions

* comment and docstring fixes

* fix possessable initialization

* split animation flags into it's own header
remove unnecessary checks
This commit is contained in:
Aaron Kimbrell
2022-07-08 22:25:15 -05:00
committed by GitHub
parent 22b2516107
commit 3865a186a7
8 changed files with 178 additions and 89 deletions

View File

@@ -208,8 +208,9 @@ void Entity::Initialize()
m_Components.insert(std::make_pair(COMPONENT_TYPE_ZONE_CONTROL, nullptr));
}
if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_POSSESSABLE) > 0) {
m_Components.insert(std::make_pair(COMPONENT_TYPE_POSSESSABLE, new PossessableComponent(this)));
uint32_t possessableComponentId = compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_POSSESSABLE);
if (possessableComponentId > 0) {
m_Components.insert(std::make_pair(COMPONENT_TYPE_POSSESSABLE, new PossessableComponent(this, possessableComponentId)));
}
if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_MODULE_ASSEMBLY) > 0) {