summaryrefslogtreecommitdiffstats
path: root/source/FallingBlock.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 13:49:01 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 13:49:01 +0200
commit34fa53ca3a78fc32003c85256eeb623f96bc663f (patch)
tree56f0e623b3275da0b55d76bc775ec29f5dbfdf1a /source/FallingBlock.cpp
parentWebAdmin: The plugin list is sorted alphabetically and if they are enabled or disabled. (diff)
downloadcuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar.gz
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar.bz2
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar.lz
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar.xz
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.tar.zst
cuberite-34fa53ca3a78fc32003c85256eeb623f96bc663f.zip
Diffstat (limited to '')
-rw-r--r--source/FallingBlock.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/FallingBlock.cpp b/source/FallingBlock.cpp
index db5679454..f20abe3ba 100644
--- a/source/FallingBlock.cpp
+++ b/source/FallingBlock.cpp
@@ -49,9 +49,9 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk)
// GetWorld()->BroadcastTeleportEntity(*this); // Test position
- int BlockX = (int)m_OriginalPosition.x;
+ int BlockX = m_OriginalPosition.x;
int BlockY = (int)(GetPosY() - 0.5);
- int BlockZ = (int)m_OriginalPosition.z;
+ int BlockZ = m_OriginalPosition.z;
if (BlockY < 0)
{
@@ -83,6 +83,15 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk)
else if (!cSandSimulator::CanContinueFallThrough(BlockBelow))
{
// Fallen onto a solid block
+ /*
+ LOGD(
+ "Sand: Checked below at {%d, %d, %d} (rel {%d, %d, %d}), it's %s, finishing the fall.",
+ BlockX, BlockY, BlockZ,
+ BlockX - a_Chunk.GetPosX() * cChunkDef::Width, BlockY, BlockZ - a_Chunk.GetPosZ() * cChunkDef::Width,
+ ItemTypeToString(BlockBelow).c_str()
+ );
+ */
+
cSandSimulator::FinishFalling(m_World, BlockX, BlockY + 1, BlockZ, m_BlockType, m_BlockMeta);
Destroy();
return;