From dcedcc3fe33e4b7783343e81594b01fd1f79c1b1 Mon Sep 17 00:00:00 2001 From: "luksor111@gmail.com" Date: Thu, 27 Dec 2012 10:23:10 +0000 Subject: Fixed Linux compilation Fixed flower pot consuming items in creative mode git-svn-id: http://mc-server.googlecode.com/svn/trunk@1111 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Blocks/BlockFlowerPot.h | 9 ++++++--- 1 file 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 ); } -- cgit v1.2.3