Inventory code cleanup, players can now see each other's armor
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -214,7 +214,7 @@ cItemHandler::cItemHandler(int a_ItemType)
|
||||
|
||||
|
||||
|
||||
bool cItemHandler::OnItemUse(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir)
|
||||
bool cItemHandler::OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ bool cItemHandler::OnItemUse(cWorld * a_World, cPlayer * a_Player, cItem * a_Ite
|
||||
|
||||
|
||||
|
||||
bool cItemHandler::OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir)
|
||||
bool cItemHandler::OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -232,12 +232,12 @@ bool cItemHandler::OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem *
|
||||
|
||||
|
||||
|
||||
void cItemHandler::OnBlockDestroyed(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ)
|
||||
void cItemHandler::OnBlockDestroyed(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ)
|
||||
{
|
||||
BLOCKTYPE Block = a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
|
||||
cBlockHandler * Handler = cBlockHandler::GetBlockHandler(Block);
|
||||
|
||||
if (a_Player->GetGameMode() == eGameMode_Survival)
|
||||
if (a_Player->GetGameMode() == gmSurvival)
|
||||
{
|
||||
if (!BlockRequiresSpecialTool(Block) || CanHarvestBlock(Block))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user