summaryrefslogtreecommitdiffstats
path: root/src/Entities/FallingBlock.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-06 21:15:19 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-06 21:15:19 +0200
commit696a7bc52e9b029b627feee76eaf5e1239417033 (patch)
treeac3e5152dd6e7eb2a9420daad8df3bb2560d544f /src/Entities/FallingBlock.cpp
parentSuggestions'd #2 (diff)
parentMerge pull request #978 from mc-server/VectorAssignmentOperator (diff)
downloadcuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar.gz
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar.bz2
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar.lz
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar.xz
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.tar.zst
cuberite-696a7bc52e9b029b627feee76eaf5e1239417033.zip
Diffstat (limited to 'src/Entities/FallingBlock.cpp')
-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();
}