summaryrefslogtreecommitdiffstats
path: root/src/Entities/FallingBlock.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-06-01 10:43:37 +0200
committerMattes D <github@xoft.cz>2014-06-01 10:43:37 +0200
commit2059944d1e39e952c164b8a87c0c3f216b3b731e (patch)
treefd210c1cf1bfcda2f7ed1292df01a26f9555c057 /src/Entities/FallingBlock.cpp
parentInitial commit of the Generator article. (diff)
parentUpdated AlchemistVillage prefabs. (diff)
downloadcuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.gz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.bz2
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.lz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.xz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.zst
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.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 beb58f207..111c5fa84 100644
--- a/src/Entities/FallingBlock.cpp
+++ b/src/Entities/FallingBlock.cpp
@@ -55,9 +55,8 @@ void cFallingBlock::Tick(float a_Dt, cChunk & a_Chunk)
return;
}
- int idx = a_Chunk.MakeIndexNoCheck(BlockX - a_Chunk.GetPosX() * cChunkDef::Width, BlockY, BlockZ - a_Chunk.GetPosZ() * cChunkDef::Width);
- BLOCKTYPE BlockBelow = a_Chunk.GetBlock(idx);
- NIBBLETYPE BelowMeta = a_Chunk.GetMeta(idx);
+ BLOCKTYPE BlockBelow = a_Chunk.GetBlock(BlockX - a_Chunk.GetPosX() * cChunkDef::Width, BlockY, BlockZ - a_Chunk.GetPosZ() * cChunkDef::Width);
+ NIBBLETYPE BelowMeta = a_Chunk.GetMeta(BlockX - a_Chunk.GetPosX() * cChunkDef::Width, BlockY, BlockZ - a_Chunk.GetPosZ() * cChunkDef::Width);
if (cSandSimulator::DoesBreakFallingThrough(BlockBelow, BelowMeta))
{
// Fallen onto a block that breaks this into pickups (e. g. half-slab)