summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 11:23:10 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 11:23:10 +0100
commitdcedcc3fe33e4b7783343e81594b01fd1f79c1b1 (patch)
tree6fa6809fb19ecc98dcdec0d975b0b14cb7964f6a /source
parentRemoved unused CryptoPP algorithms (Salsa, Sosemanuk) that won't compile on Mac (found by Sam Sxw) (diff)
downloadcuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar.gz
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar.bz2
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar.lz
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar.xz
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.tar.zst
cuberite-dcedcc3fe33e4b7783343e81594b01fd1f79c1b1.zip
Diffstat (limited to 'source')
-rw-r--r--source/Blocks/BlockFlowerPot.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/Blocks/BlockFlowerPot.h b/source/Blocks/BlockFlowerPot.h
index d5653108d..36f4389c3 100644
--- a/source/Blocks/BlockFlowerPot.h
+++ b/source/Blocks/BlockFlowerPot.h
@@ -20,7 +20,7 @@ public:
{
a_Pickups.push_back(cItem(E_ITEM_FLOWER_POT, 1, 0));
if( a_BlockMeta == 0 ) return;
- cItem & Plant = cItem(E_ITEM_RED_ROSE, 1, 0);
+ cItem Plant;
switch( a_BlockMeta )
{
case 1: Plant = cItem(E_ITEM_RED_ROSE, 1, 0); break;
@@ -64,8 +64,11 @@ public:
case E_BLOCK_TALL_GRASS:
if( a_Player->GetEquippedItem().m_ItemDamage == E_META_TALL_GRASS_FERN ) Meta = 11; break;
}
- cItem Item(a_Player->GetEquippedItem().m_ItemType, 1);
- a_Player->GetInventory().RemoveItem(Item);
+ if(a_Player->GetGameMode() != eGameMode_Creative)
+ {
+ cItem Item(a_Player->GetEquippedItem().m_ItemType, 1);
+ a_Player->GetInventory().RemoveItem(Item);
+ }
a_World->SetBlockMeta( a_BlockX, a_BlockY, a_BlockZ, Meta );
}