From 9529a4255999efc0970d82385ef1ff07c62a7a02 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 01:56:26 -0700 Subject: [PATCH] Fixed creative players not being able to drink Fixes #1215 --- src/ClientHandle.cpp | 7 ++++--- 1 file 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();