1
0

cMonster::m_Target safety across worlds

This commit is contained in:
LogicParrot
2016-02-01 22:49:34 +02:00
parent a5403c8976
commit 4aade202e0
17 changed files with 294 additions and 83 deletions

View File

@@ -26,9 +26,9 @@ bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
if ((m_Target != nullptr) && (m_Target->IsPlayer()))
if ((GetTarget() != nullptr) && (GetTarget()->IsPlayer()))
{
if (!static_cast<cPlayer *>(m_Target)->IsGameModeCreative())
if (!static_cast<cPlayer *>(GetTarget())->IsGameModeCreative())
{
m_EMState = CHASING;
}