diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-29 23:28:59 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-29 23:28:59 +0100 |
commit | 4741e5e794f0c6781ed9e8b9be9dc955b7ba828f (patch) | |
tree | 89810fd644132dce1064d35700a3c998800b6d21 /src/Blocks/BlockStairs.h | |
parent | Implemented trapdoors, fixes #43 and #105 (diff) | |
download | cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar.gz cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar.bz2 cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar.lz cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar.xz cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.tar.zst cuberite-4741e5e794f0c6781ed9e8b9be9dc955b7ba828f.zip |
Diffstat (limited to '')
-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) { |