1
0

Fixed the bucket handling code trying to simulate at the wrong coords (client sends all coords as -1 to signify "item use")

git-svn-id: http://mc-server.googlecode.com/svn/trunk@961 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-10-14 17:03:18 +00:00
parent 46cb1e9429
commit 331ad53b60

View File

@ -67,21 +67,21 @@ public:
if (a_Dir >= 0)
{
AddDirection(a_X, a_Y, a_Z, a_Dir);
}
if(a_World->GetBlock(a_X, a_Y, a_Z) == E_BLOCK_AIR)
{
cItem Item(a_Item->m_ItemID, 1);
if ((a_Player->GetGameMode() == 1) || (a_Player->GetInventory().RemoveItem(Item)))
if (a_World->GetBlock(a_X, a_Y, a_Z) == E_BLOCK_AIR)
{
a_World->SetBlock(a_X, a_Y, a_Z, NewBlock, 0);
if (a_Player->GetGameMode() == 1)
cItem Item(a_Item->m_ItemID, 1);
if ((a_Player->GetGameMode() == 1) || (a_Player->GetInventory().RemoveItem(Item)))
{
break; //No new Bucket for creative players
a_World->SetBlock(a_X, a_Y, a_Z, NewBlock, 0);
if (a_Player->GetGameMode() == 1)
{
break; //No new Bucket for creative players
}
cItem Item(E_ITEM_BUCKET, 1);
a_Player->GetInventory().AddItem(Item);
return true;
}
cItem Item(E_ITEM_BUCKET, 1);
a_Player->GetInventory().AddItem(Item);
return true;
}
}
}