summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-07 22:45:00 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:19 +0200
commit1eb04a48ee3ec4114adc4334e6fbcc7561834025 (patch)
tree6107d38a80cf4f4584f0d3edb6610f67148fa8e2 /src/ClientHandle.cpp
parentPawn.cpp: fixed effect iterator BAD_ACCESS (diff)
downloadcuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.gz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.bz2
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.lz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.xz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.zst
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index e4bb9d8e9..7b114b927 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -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;