summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-02-28 22:32:10 +0100
committerHowaner <franzi.moos@googlemail.com>2014-02-28 22:32:10 +0100
commit0274db0e14adc269303380f41a54ffa07422317b (patch)
tree4b88d8dfffbddf58be86d3c06dfec17a20411e61
parentMerge branch 'master' into Slabs (diff)
downloadcuberite-0274db0e14adc269303380f41a54ffa07422317b.tar
cuberite-0274db0e14adc269303380f41a54ffa07422317b.tar.gz
cuberite-0274db0e14adc269303380f41a54ffa07422317b.tar.bz2
cuberite-0274db0e14adc269303380f41a54ffa07422317b.tar.lz
cuberite-0274db0e14adc269303380f41a54ffa07422317b.tar.xz
cuberite-0274db0e14adc269303380f41a54ffa07422317b.tar.zst
cuberite-0274db0e14adc269303380f41a54ffa07422317b.zip
-rw-r--r--src/Blocks/BlockSlab.h12
-rw-r--r--src/ClientHandle.cpp2
2 files changed, 6 insertions, 8 deletions
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index 8a3c998ec..7cd2c97b2 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -176,15 +176,13 @@ public:
virtual const char * GetStepSound(void) override
{
- BLOCKTYPE Block = GetSingleSlabType(m_BlockType);
- if (Block != m_BlockType)
- {
- return cBlockHandler::GetBlockHandler(Block)->GetStepSound();
- }
- else
+ switch (m_BlockType)
{
- return "step.stone";
+ case E_BLOCK_DOUBLE_STONE_SLAB: return "step.stone";
+ case E_BLOCK_DOUBLE_WOODEN_SLAB: return "step.wood";
}
+ ASSERT(!"Unhandled double slab type!");
+ return "";
}
} ;
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index ce549b0b1..dd2116dbf 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1043,7 +1043,7 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, e
if (
cBlockSlabHandler::IsAnySlabType(ClickedBlock) && // Is there a slab already?
cBlockSlabHandler::IsAnySlabType(EquippedBlock) && // Is the player placing another slab?
- ((ClickedBlockMeta & 0x07) == EquippedBlockDamage) && // Is it the same slab type?
+ ((ClickedBlockMeta & 0x07) == EquippedBlockDamage) && // Is it the same slab type?
(
(a_BlockFace == BLOCK_FACE_TOP) || // Clicking the top of a bottom slab
(a_BlockFace == BLOCK_FACE_BOTTOM) // Clicking the bottom of a top slab