1
0

Added horse saddling

It uses pig code, sorry if it don't works, i'm a noob, but it should work.
This commit is contained in:
tonibm19 2013-10-15 17:09:43 +02:00
parent 9be35e1222
commit 8147ccd13b

View File

@ -1,4 +1,3 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Horse.h"
@ -107,6 +106,18 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
m_TameAttemptTimes++;
a_Player.AttachTo(this);
if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE)
{
if (!a_Player.IsGameModeCreative())
{
a_Player.GetInventory().RemoveOneEquippedItem();
}
// Set saddle state & broadcast metadata
m_bIsSaddled = true;
m_World->BroadcastEntityMetadata(*this);
}
}