From 2c187e53b73eb7104297fd2fa0a25914ff235981 Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Thu, 17 Oct 2013 21:28:45 +0200 Subject: Moved lines don't know if I did well --- source/Mobs/Horse.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'source/Mobs') diff --git a/source/Mobs/Horse.cpp b/source/Mobs/Horse.cpp index d027e2076..0077145dc 100644 --- a/source/Mobs/Horse.cpp +++ b/source/Mobs/Horse.cpp @@ -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); } -- cgit v1.2.3