1
0

Implemented drinkable potions, noeffect entity effect,

Clears entity effects on death
This commit is contained in:
archshift
2014-06-07 16:32:37 -07:00
parent 1eb04a48ee
commit 2185c72c2c
8 changed files with 165 additions and 6 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() || ItemHandler->IsDrinkable())
if (ItemHandler->IsFood() || ItemHandler->IsDrinkable(&m_Player->GetEquippedItem()))
{
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() || ItemHandler->IsDrinkable()) && !m_Player->IsGameModeCreative())
else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(&Equipped)) && !m_Player->IsGameModeCreative())
{
if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable())
if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable(&Equipped))
{
// The player is satiated, they cannot eat
return;