1
0

Logging OnBlockDig and OnBlockPlace only in Debug mode ( http://mc-server.org/support/index.php?do=details&task_id=133&project=2 )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@447 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-04-03 14:07:18 +00:00
parent 00ea7d12c1
commit b5a646d94a

View File

@ -759,7 +759,10 @@ void cClientHandle::HandleBlockDig(cPacket_BlockDig * a_Packet)
return;
}
LOG("OnBlockDig: %i %i %i Dir: %i Stat: %i", a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, a_Packet->m_Direction, a_Packet->m_Status);
LOGD("OnBlockDig: {%i, %i, %i} Dir: %i Stat: %i",
a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ,
a_Packet->m_Direction, a_Packet->m_Status
);
if (a_Packet->m_Status == 0x04) // Drop block
{
m_Player->TossItem(false);
@ -969,7 +972,10 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
cItem Item;
Item.m_ItemID = Equipped.m_ItemID;
Item.m_ItemCount = 1;
LOG("Placing item of type: %i", (int)a_Packet->m_ItemType);
LOGD("Placing item of type %i at {%d, %d, %d}",
(int)a_Packet->m_ItemType,
a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ
);
// Hacked in edible items go!~
// TODO: Handle hunger