1
0
Fork 0

Removed unused function

* Fixes #2444
This commit is contained in:
Tiger Wang 2015-08-22 19:35:56 +01:00
parent 3e0af6ca36
commit e254a76884
2 changed files with 0 additions and 23 deletions

View File

@ -104,21 +104,3 @@ void cAggressiveMonster::Attack(std::chrono::milliseconds a_Dt)
m_AttackInterval = 0.0;
m_Target->TakeDamage(dtMobAttack, this, m_AttackDamage, 0);
}
bool cAggressiveMonster::IsMovingToTargetPosition()
{
// Difference between destination x and target x is negligible (to 10^-12 precision)
if (fabsf(static_cast<float>(m_FinalDestination.x) - static_cast<float>(m_Target->GetPosX())) < std::numeric_limits<float>::epsilon())
{
return false;
}
// Difference between destination z and target z is negligible (to 10^-12 precision)
else if (fabsf(static_cast<float>(m_FinalDestination.z) - static_cast<float>(m_Target->GetPosZ())) > std::numeric_limits<float>::epsilon())
{
return false;
}
return true;
}

View File

@ -21,11 +21,6 @@ public:
virtual void EventSeePlayer(cEntity *) override;
virtual void Attack(std::chrono::milliseconds a_Dt);
protected:
/** Whether this mob's destination is the same as its target's position. */
bool IsMovingToTargetPosition();
} ;