1
0

Implemented milk, added documentation to Pawn.h

This commit is contained in:
archshift
2014-06-07 13:45:00 -07:00
parent 615152eb8c
commit 1eb04a48ee
7 changed files with 86 additions and 5 deletions

View File

@@ -850,7 +850,7 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
case DIG_STATUS_SHOOT_EAT:
{
cItemHandler * ItemHandler = cItemHandler::GetItemHandler(m_Player->GetEquippedItem());
if (ItemHandler->IsFood())
if (ItemHandler->IsFood() || ItemHandler->IsDrinkable())
{
m_Player->AbortEating();
return;
@@ -1182,9 +1182,9 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
{
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
}
else if (ItemHandler->IsFood() && !m_Player->IsGameModeCreative())
else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable()) && !m_Player->IsGameModeCreative())
{
if (m_Player->IsSatiated())
if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable())
{
// The player is satiated, they cannot eat
return;