summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-18 10:56:26 +0200
committerarchshift <admin@archshift.com>2014-07-18 10:56:26 +0200
commit9529a4255999efc0970d82385ef1ff07c62a7a02 (patch)
tree21ad1e31234f3af1c76787976ada5fc24eeb304c
parentCheckBasicStyle: Proper spaces with commas. (diff)
downloadcuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar.gz
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar.bz2
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar.lz
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar.xz
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.tar.zst
cuberite-9529a4255999efc0970d82385ef1ff07c62a7a02.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 97466c331..58247a836 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1209,11 +1209,12 @@ 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() || ItemHandler->IsDrinkable(EquippedDamage)) && !m_Player->IsGameModeCreative())
+ else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage)))
{
- if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable(EquippedDamage))
+ if ((m_Player->IsSatiated() || m_Player->IsGameModeCreative()) &&
+ ItemHandler->IsFood())
{
- // The player is satiated, they cannot eat
+ // The player is satiated or in creative, and trying to eat
return;
}
m_Player->StartEating();