CBaseMonster: Cancel out of AttackThink if m_eEnemy is not set

This commit is contained in:
Marco Cawthorne 2021-04-10 23:25:06 +02:00
parent 929a8f8630
commit 07094f1cb4

View file

@ -126,6 +126,9 @@ CBaseMonster::AttackThink(void)
return;
}
if (!m_eEnemy)
return;
/* reset */
if (m_eEnemy.solid == SOLID_CORPSE || (m_eEnemy && m_eEnemy.health <= 0)) {
m_eEnemy = __NULL__;