Skip to content

Commit

Permalink
Update Entity.cpp
Browse files Browse the repository at this point in the history
Update Entity.cpp
  • Loading branch information
EmosewaMC committed Oct 21, 2023
1 parent 0005ff2 commit e22d342
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dGame/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void Entity::Initialize() {

bool isSmashable = GetVarAs<int32_t>(u"is_smashable") != 0;
if (buffComponentID > 0 || collectibleComponentID > 0 || isSmashable) {
DestroyableComponent* comp = new DestroyableComponent(this);
DestroyableComponent* comp = AddComponent<DestroyableComponent>();
if (m_Character) {
comp->LoadFromXml(m_Character->GetXMLDoc());
} else {
Expand Down Expand Up @@ -422,8 +422,6 @@ void Entity::Initialize() {
}
}
}

m_Components.insert(std::make_pair(eReplicaComponentType::DESTROYABLE, comp));
}

if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::CHARACTER) > 0 || m_Character) {
Expand Down

0 comments on commit e22d342

Please sign in to comment.