Fixed saddle horse

master
tonibm19 2013-10-15 21:25:33 +02:00
parent 400cab0b86
commit 4ee2632d4f
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,3 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Horse.h" #include "Horse.h"
@ -105,9 +104,6 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
m_Attachee->Detach(); m_Attachee->Detach();
} }
m_TameAttemptTimes++;
a_Player.AttachTo(this);
if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE) if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE)
{ {
if (!a_Player.IsGameModeCreative()) if (!a_Player.IsGameModeCreative())
@ -119,6 +115,11 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
m_bIsSaddled = true; m_bIsSaddled = true;
m_World->BroadcastEntityMetadata(*this); m_World->BroadcastEntityMetadata(*this);
} }
else
{
m_TameAttemptTimes++;
a_Player.AttachTo(this);
}
} }