cMonster::m_Target safety across worlds

This commit is contained in:
LogicParrot
2016-02-03 22:50:17 +02:00
parent a5403c8976
commit 4aade202e0
17 changed files with 294 additions and 83 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
bool cGhast::Attack(std::chrono::milliseconds a_Dt)
{
if ((m_Target != nullptr) && (m_AttackCoolDownTicksLeft == 0))
if ((GetTarget() != nullptr) && (m_AttackCoolDownTicksLeft == 0))
{
// Setting this higher gives us more wiggle room for attackrate
Vector3d Speed = GetLookVector() * 20;