From 6127c21af97e450037daecd981cc88f40c3af423 Mon Sep 17 00:00:00 2001 From: netchip Date: Mon, 29 Sep 2014 17:18:20 +0200 Subject: BlockStone: drop the right cobblestone on onBreak(). Signed-off-by: netchip --- src/Blocks/BlockStone.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/Blocks') diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h index cd5230f49..2b71cebf1 100644 --- a/src/Blocks/BlockStone.h +++ b/src/Blocks/BlockStone.h @@ -2,7 +2,7 @@ #pragma once #include "BlockHandler.h" - +#include "BlockID.h" @@ -18,9 +18,15 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); + switch(a_BlockMeta) { + case E_META_STONE: + a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); + break; + default: + a_Pickups.push_back(cItem(E_BLOCK_STONE, 1, a_BlockMeta)); + } } -} ; +}; -- cgit v1.2.3 From 9628733df2ab39668bf1e92571442b1486d9d9de Mon Sep 17 00:00:00 2001 From: w00tc0d3 Date: Mon, 29 Sep 2014 19:19:17 +0200 Subject: BlockStone.h: fix the codestyle --- src/Blocks/BlockStone.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Blocks') diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h index 2b71cebf1..2e7801f8e 100644 --- a/src/Blocks/BlockStone.h +++ b/src/Blocks/BlockStone.h @@ -18,13 +18,12 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - switch(a_BlockMeta) { - case E_META_STONE: - a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); - break; - default: - a_Pickups.push_back(cItem(E_BLOCK_STONE, 1, a_BlockMeta)); + if(a_BlockMeta == E_META_STONE) + { + a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); + return; } + a_Pickups.push_back(cItem(E_BLOCK_STONE, 1, a_BlockMeta)); } }; -- cgit v1.2.3