1
0

Moved lines

don't know if I did well
This commit is contained in:
tonibm19 2013-10-17 21:28:45 +02:00
parent 90c39c55a9
commit 2c187e53b7

View File

@ -1,3 +1,4 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Horse.h"
@ -89,22 +90,6 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk)
void cHorse::OnRightClicked(cPlayer & a_Player)
{
if (m_Attachee != NULL)
{
if (m_Attachee->GetUniqueID() == a_Player.GetUniqueID())
{
a_Player.Detach();
return;
}
if (m_Attachee->IsPlayer())
{
return;
}
m_Attachee->Detach();
}
if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE) && (!m_bIsSaddled) && (m_bIsTame))
{
if (!a_Player.IsGameModeCreative())
@ -123,6 +108,22 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
}
else
{
if (m_Attachee != NULL)
{
if (m_Attachee->GetUniqueID() == a_Player.GetUniqueID())
{
a_Player.Detach();
return;
}
if (m_Attachee->IsPlayer())
{
return;
}
m_Attachee->Detach();
}
m_TameAttemptTimes++;
a_Player.AttachTo(this);
}