diff options
author | Mattes D <github@xoft.cz> | 2013-11-30 16:20:27 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-11-30 16:20:27 +0100 |
commit | 2bbe5046e9d2119f2751af01cbce3185ee9514ed (patch) | |
tree | 059a36e4c22c22b1f6d591bc02ade598153015b4 /src/Blocks/BlockStairs.h | |
parent | Changed cBlockHandler->OnUpdate() to use cChunk directly. (diff) | |
parent | Fixed pistons extending (diff) | |
download | cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar.gz cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar.bz2 cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar.lz cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar.xz cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.tar.zst cuberite-2bbe5046e9d2119f2751af01cbce3185ee9514ed.zip |
Diffstat (limited to 'src/Blocks/BlockStairs.h')
-rw-r--r-- | src/Blocks/BlockStairs.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h index 8d259eee3..fa378e4b5 100644 --- a/src/Blocks/BlockStairs.h +++ b/src/Blocks/BlockStairs.h @@ -47,8 +47,28 @@ public: return true; } - // TODO: step sound - + virtual const char * GetStepSound(void) override + { + if ( + (m_BlockType == E_BLOCK_WOODEN_STAIRS) || + (m_BlockType == E_BLOCK_SPRUCE_WOOD_STAIRS) || + (m_BlockType == E_BLOCK_JUNGLE_WOOD_STAIRS) || + (m_BlockType == E_BLOCK_ACACIA_WOOD_STAIRS) || + (m_BlockType == E_BLOCK_BIRCH_WOOD_STAIRS) || + (m_BlockType == E_BLOCK_DARK_OAK_WOOD_STAIRS) + ) + { + return "step.wood"; + } + + return "step.stone"; + } + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + // Reset meta to 0 + a_Pickups.push_back(cItem(m_BlockType, 1, 0)); + } static NIBBLETYPE RotationToMetaData(double a_Rotation) { |