Player eating is now properly broadcast to other players.
Also fixed the API relating to food, determining player gamemode, and removed several unneeded API functions.
This commit is contained in:
@@ -801,6 +801,11 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
|
||||
}
|
||||
else if (ItemHandler->IsFood())
|
||||
{
|
||||
if (m_Player->IsSatiated())
|
||||
{
|
||||
// The player is satiated, they cannot eat
|
||||
return;
|
||||
}
|
||||
m_Player->StartEating();
|
||||
if (PlgMgr->CallHookPlayerEating(*m_Player))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user