1
0

Redstone simulator now directly accesses cChunk

* Redstone simulator performance improvements
* Added return values to some functions
* Minor fixes
This commit is contained in:
Tiger Wang
2014-04-27 17:35:41 +01:00
parent da931da603
commit bbc5faa723
10 changed files with 591 additions and 458 deletions

View File

@@ -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();
}