summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-27 23:12:52 +0200
committermadmaxoft <github@xoft.cz>2014-04-27 23:12:52 +0200
commit9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734 (patch)
tree50ce95772009a202a5e3ae31f497a57bc3191bf9 /src
parentFixed player spawning #953. (diff)
downloadcuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar.gz
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar.bz2
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar.lz
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar.xz
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.tar.zst
cuberite-9dc9713a9c3015d2b67fc18fc2fb8f3b5ce8d734.zip
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Entity.cpp1
-rw-r--r--src/Mobs/AggressiveMonster.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 827b88717..2d325805b 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -443,6 +443,7 @@ bool cEntity::ArmorCoversAgainst(eDamageType a_DamageType)
}
}
ASSERT(!"Invalid damage type!");
+ return false;
}
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp
index 4997952be..447bf3549 100644
--- a/src/Mobs/AggressiveMonster.cpp
+++ b/src/Mobs/AggressiveMonster.cpp
@@ -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;
}