From 331ad53b60fe81fa459b2c26352d4d66144fbc00 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 14 Oct 2012 17:03:18 +0000 Subject: 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 --- source/Items/ItemBucket.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source/Items') diff --git a/source/Items/ItemBucket.h b/source/Items/ItemBucket.h index 736112960..21c9da2a9 100644 --- a/source/Items/ItemBucket.h +++ b/source/Items/ItemBucket.h @@ -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; } } } -- cgit v1.2.3