Redstone simulator now directly accesses cChunk
* Redstone simulator performance improvements * Added return values to some functions * Minor fixes
This commit is contained in:
@@ -108,14 +108,13 @@ void cAggressiveMonster::Attack(float a_Dt)
|
||||
|
||||
bool cAggressiveMonster::IsMovingToTargetPosition()
|
||||
{
|
||||
float epsilon = 0.000000000001;
|
||||
// Difference between destination x and target x is negligible (to 10^-12 precision)
|
||||
if (fabsf((float)m_FinalDestination.x - (float)m_Target->GetPosX()) < epsilon)
|
||||
if (fabsf((float)m_FinalDestination.x - (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(m_FinalDestination.z - (float)m_Target->GetPosZ()) > epsilon)
|
||||
else if (fabsf((float)m_FinalDestination.z - (float)m_Target->GetPosZ()) > std::numeric_limits<float>::epsilon())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user