1
0

Fixed warnings.

This commit is contained in:
madmaxoft 2014-04-27 23:12:52 +02:00
parent 4c165f8a6d
commit 9dc9713a9c
2 changed files with 3 additions and 2 deletions

View File

@ -443,6 +443,7 @@ bool cEntity::ArmorCoversAgainst(eDamageType a_DamageType)
}
}
ASSERT(!"Invalid damage type!");
return false;
}

View File

@ -108,14 +108,14 @@ void cAggressiveMonster::Attack(float a_Dt)
bool cAggressiveMonster::IsMovingToTargetPosition()
{
static const float epsilon = 0.000000000001;
static const float epsilon = 0.000000000001f;
// Difference between destination x and target x is negligible (to 10^-12 precision)
if (fabsf((float)m_FinalDestination.x - (float)m_Target->GetPosX()) < 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()) > epsilon)
{
return false;
}