diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-27 18:35:41 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-27 18:35:41 +0200 |
commit | bbc5faa723b7dd63250949f7b28601ffd748e2f5 (patch) | |
tree | e74901e581237b889cd8d7ccfaaf376f8b616508 /src/Entities | |
parent | Merge pull request #941 from archshift/master (diff) | |
download | cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar.gz cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar.bz2 cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar.lz cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar.xz cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.tar.zst cuberite-bbc5faa723b7dd63250949f7b28601ffd748e2f5.zip |
Diffstat (limited to 'src/Entities')
-rw-r--r-- | src/Entities/Entity.cpp | 1 | ||||
-rw-r--r-- | src/Entities/FallingBlock.cpp | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 7c8e18b51..7a301a5b7 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -441,6 +441,7 @@ bool cEntity::ArmorCoversAgainst(eDamageType a_DamageType) } } ASSERT(!"Invalid damage type!"); + return false; } diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp index bcdac0291..86720ac94 100644 --- a/src/Entities/FallingBlock.cpp +++ b/src/Entities/FallingBlock.cpp @@ -88,8 +88,7 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk) AddPosition(GetSpeed() * MilliDt); // If not static (One billionth precision) broadcast movement. - static const float epsilon = 0.000000001; - if ((fabs(GetSpeedX()) > epsilon) || (fabs(GetSpeedZ()) > epsilon)) + if ((fabs(GetSpeedX()) > std::numeric_limits<double>::epsilon()) || (fabs(GetSpeedZ()) > std::numeric_limits<double>::epsilon())) { BroadcastMovementUpdate(); } |