1
0

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
This commit is contained in:
luksor111@gmail.com 2012-12-27 10:23:10 +00:00
parent a5a8ea55b9
commit dcedcc3fe3

View File

@ -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 );
}