diff options
author | Mattes D <github@xoft.cz> | 2014-04-26 23:26:59 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-04-26 23:26:59 +0200 |
commit | da931da6037279826a52980f9335e189c370d4d2 (patch) | |
tree | 2935aeea2eab9d1ce7dbf571087d905a4681fae3 /src/Entities/FallingBlock.cpp | |
parent | Merge pull request #863 from mc-server/chunkysparsing (diff) | |
parent | More small fixes. (diff) | |
download | cuberite-da931da6037279826a52980f9335e189c370d4d2.tar cuberite-da931da6037279826a52980f9335e189c370d4d2.tar.gz cuberite-da931da6037279826a52980f9335e189c370d4d2.tar.bz2 cuberite-da931da6037279826a52980f9335e189c370d4d2.tar.lz cuberite-da931da6037279826a52980f9335e189c370d4d2.tar.xz cuberite-da931da6037279826a52980f9335e189c370d4d2.tar.zst cuberite-da931da6037279826a52980f9335e189c370d4d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/FallingBlock.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp index a66c7e4ae..bcdac0291 100644 --- a/src/Entities/FallingBlock.cpp +++ b/src/Entities/FallingBlock.cpp @@ -87,7 +87,9 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk) AddSpeedY(MilliDt * -9.8f); AddPosition(GetSpeed() * MilliDt); - if ((GetSpeedX() != 0) || (GetSpeedZ() != 0)) + // If not static (One billionth precision) broadcast movement. + static const float epsilon = 0.000000001; + if ((fabs(GetSpeedX()) > epsilon) || (fabs(GetSpeedZ()) > epsilon)) { BroadcastMovementUpdate(); } |