From 67b5a417e35febeb211d29320197d5f1ac2ba291 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 30 Nov 2014 22:13:13 +0100 Subject: Many other block fixes. --- src/Blocks/BlockSnow.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/Blocks/BlockSnow.h') diff --git a/src/Blocks/BlockSnow.h b/src/Blocks/BlockSnow.h index 7b6094c9f..4f1712974 100644 --- a/src/Blocks/BlockSnow.h +++ b/src/Blocks/BlockSnow.h @@ -67,19 +67,16 @@ public: virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { - if (a_RelY > 0) + if (a_RelY <= 0) { - BLOCKTYPE BlockBelow = a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ); - NIBBLETYPE MetaBelow = a_Chunk.GetMeta(a_RelX, a_RelY - 1, a_RelZ); - - if (cBlockInfo::IsSnowable(BlockBelow) || ((BlockBelow == E_BLOCK_SNOW) && (MetaBelow == 7))) - { - // If block below is snowable, or it is a thin slow block and has a meta of 7 (full thin snow block), say yay - return true; - } + return false; } - - return false; + + BLOCKTYPE BlockBelow = a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ); + NIBBLETYPE MetaBelow = a_Chunk.GetMeta(a_RelX, a_RelY - 1, a_RelZ); + + // If block below is snowable, or it is a thin slow block and has a meta of 7 (full thin snow block), say yay + return (cBlockInfo::IsSnowable(BlockBelow) || ((BlockBelow == E_BLOCK_SNOW) && (MetaBelow == 7))); } -- cgit v1.2.3