fix undeleted dpEntity after enemy smashed

could be the cause of long-soak (hours long) sessions having CPU issues
This commit is contained in:
Unknown 2021-12-14 16:24:48 +01:00
parent 259c236b72
commit c060b01037

View File

@ -129,6 +129,9 @@ BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const uint32_t id)
BaseCombatAIComponent::~BaseCombatAIComponent() {
if (m_dpEntity)
dpWorld::Instance().RemoveEntity(m_dpEntity);
if (m_dpEntityEnemy)
dpWorld::Instance().RemoveEntity(m_dpEntityEnemy);
}
void BaseCombatAIComponent::Update(const float deltaTime) {