summaryrefslogtreecommitdiffstats
path: root/source/FallingBlock.cpp
diff options
context:
space:
mode:
authorkeyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-22 07:33:10 +0100
committerkeyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-22 07:33:10 +0100
commit39e4bd323914143408120fc914fd1c52557baac6 (patch)
tree434530690980e923d6b989b494e9fa9a4c6699ac /source/FallingBlock.cpp
parentDelayedFluidSimulator: optimized block storage for large amounts of blocks. (diff)
downloadcuberite-39e4bd323914143408120fc914fd1c52557baac6.tar
cuberite-39e4bd323914143408120fc914fd1c52557baac6.tar.gz
cuberite-39e4bd323914143408120fc914fd1c52557baac6.tar.bz2
cuberite-39e4bd323914143408120fc914fd1c52557baac6.tar.lz
cuberite-39e4bd323914143408120fc914fd1c52557baac6.tar.xz
cuberite-39e4bd323914143408120fc914fd1c52557baac6.tar.zst
cuberite-39e4bd323914143408120fc914fd1c52557baac6.zip
Diffstat (limited to '')
-rw-r--r--source/FallingBlock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/FallingBlock.cpp b/source/FallingBlock.cpp
index 8ad313bb9..9fbf498e2 100644
--- a/source/FallingBlock.cpp
+++ b/source/FallingBlock.cpp
@@ -43,13 +43,13 @@ void cFallingBlock::SpawnOn(cClientHandle & a_ClientHandle)
void cFallingBlock::Tick(float a_Dt, MTRand & a_TickRandom)
{
float MilliDt = a_Dt * 0.001f;
- m_Speed.y -= MilliDt * 9.8f;
- m_Pos.y += m_Speed.y * MilliDt;
+ SetSpeedY(GetSpeedY() - (MilliDt * 9.8f));
+ SetPosY(GetPosY() + (GetSpeedY() * MilliDt));
// GetWorld()->BroadcastTeleportEntity(*this); // Test position
int BlockX = (int)m_OriginalPosition.x;
- int BlockY = (int)(m_Pos.y - 0.5);
+ int BlockY = (int)(GetPosY() - 0.5);
int BlockZ = (int)m_OriginalPosition.z;
if (BlockY < 0)