summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-04 21:25:54 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-04 21:25:54 +0200
commit213a96e6d6373dc2a015a165d5309c20d460665d (patch)
treefad1c56ad379ced744955ae50e69715c49c40231 /src/Entities
parentFixed ProtoProxy compilation in MSVC2013. (diff)
parentFixed 027efe09ea3d3222c3cbf169643e57773c1614ae (diff)
downloadcuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar.gz
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar.bz2
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar.lz
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar.xz
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.tar.zst
cuberite-213a96e6d6373dc2a015a165d5309c20d460665d.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/FallingBlock.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp
index 99bff1100..beb58f207 100644
--- a/src/Entities/FallingBlock.cpp
+++ b/src/Entities/FallingBlock.cpp
@@ -87,9 +87,8 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk)
AddSpeedY(MilliDt * -9.8f);
AddPosition(GetSpeed() * MilliDt);
- // If not static (One billionth precision) broadcast movement.
- static const float epsilon = 0.000000001f;
- if ((fabs(GetSpeedX()) > epsilon) || (fabs(GetSpeedZ()) > epsilon))
+ // If not static (one billionth precision) broadcast movement
+ if ((fabs(GetSpeedX()) > std::numeric_limits<double>::epsilon()) || (fabs(GetSpeedZ()) > std::numeric_limits<double>::epsilon()))
{
BroadcastMovementUpdate();
}