Update DestroyableComponent.cpp

This commit is contained in:
David Markowitz 2023-06-16 02:02:33 -07:00
parent a992a28088
commit be17d1a467

View File

@ -52,7 +52,7 @@ DestroyableComponent::DestroyableComponent(Entity* parent, int32_t componentId)
m_IsGMImmune = false; m_IsGMImmune = false;
m_IsShielded = false; m_IsShielded = false;
m_DamageToAbsorb = 0; m_DamageToAbsorb = 0;
m_IsModuleAssembly = m_Parent->HasComponent(eReplicaComponentType::MODULE_ASSEMBLY); m_IsModuleAssembly = m_ParentEntity->HasComponent(eReplicaComponentType::MODULE_ASSEMBLY);
m_DirtyThreatList = false; m_DirtyThreatList = false;
m_HasThreats = false; m_HasThreats = false;
m_ExplodeFactor = 1.0f; m_ExplodeFactor = 1.0f;
@ -79,7 +79,7 @@ void DestroyableComponent::Startup() {
} }
void DestroyableComponent::LoadConfigData() { void DestroyableComponent::LoadConfigData() {
SetIsSmashable(m_ParentEntity->GetVarAs<int32_t>(u"is_smashable") != 0); SetIsSmashable(GetIsSmashable() | (m_ParentEntity->GetVarAs<int32_t>(u"is_smashable") != 0));
} }
void DestroyableComponent::LoadTemplateData() { void DestroyableComponent::LoadTemplateData() {
if (m_ParentEntity->IsPlayer()) return; if (m_ParentEntity->IsPlayer()) return;