mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
fix undeleted dpEntity after enemy smashed
could be the cause of long-soak (hours long) sessions having CPU issues
This commit is contained in:
parent
259c236b72
commit
c060b01037
@ -129,6 +129,9 @@ BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const uint32_t id)
|
|||||||
BaseCombatAIComponent::~BaseCombatAIComponent() {
|
BaseCombatAIComponent::~BaseCombatAIComponent() {
|
||||||
if (m_dpEntity)
|
if (m_dpEntity)
|
||||||
dpWorld::Instance().RemoveEntity(m_dpEntity);
|
dpWorld::Instance().RemoveEntity(m_dpEntity);
|
||||||
|
|
||||||
|
if (m_dpEntityEnemy)
|
||||||
|
dpWorld::Instance().RemoveEntity(m_dpEntityEnemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseCombatAIComponent::Update(const float deltaTime) {
|
void BaseCombatAIComponent::Update(const float deltaTime) {
|
||||||
|
Loading…
Reference in New Issue
Block a user