1
0

Fixed creative players not being able to drink

Fixes #1215
This commit is contained in:
archshift 2014-07-18 01:56:26 -07:00
parent 204b591172
commit 9529a42559

View File

@ -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();