diff options
Diffstat (limited to '')
-rw-r--r-- | source/Mobs/Horse.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
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); } |