diff options
author | tonibm19 <tonibm19@gmail.com> | 2013-10-17 18:41:52 +0200 |
---|---|---|
committer | tonibm19 <tonibm19@gmail.com> | 2013-10-17 18:41:52 +0200 |
commit | 90c39c55a97d745de4c33e3788afb75f4c3d2bc8 (patch) | |
tree | 8b63bfb40757f6dae517547bbf3d46055278cc02 /source | |
parent | Improved horse saddling [SEE DESC] (diff) | |
download | cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar.gz cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar.bz2 cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar.lz cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar.xz cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.tar.zst cuberite-90c39c55a97d745de4c33e3788afb75f4c3d2bc8.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Mobs/Horse.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/Mobs/Horse.cpp b/source/Mobs/Horse.cpp index 6876a5fa4..d027e2076 100644 --- a/source/Mobs/Horse.cpp +++ b/source/Mobs/Horse.cpp @@ -1,4 +1,3 @@ - #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Horse.h" @@ -76,6 +75,7 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk) if (m_RearTickCount == 20) { m_bIsRearing = false; + m_RearTickCount = 0; } else { m_RearTickCount++;} } @@ -105,7 +105,7 @@ void cHorse::OnRightClicked(cPlayer & a_Player) m_Attachee->Detach(); } - if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE && !m_bIsSaddled && m_bIsTame) + if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE) && (!m_bIsSaddled) && (m_bIsTame)) { if (!a_Player.IsGameModeCreative()) { @@ -116,7 +116,12 @@ void cHorse::OnRightClicked(cPlayer & a_Player) m_bIsSaddled = true; m_World->BroadcastEntityMetadata(*this); } - else + else if ((a_Player.GetEquippedItem().m_ItemType != E_ITEM_EMPTY) && (!m_bIsSaddled) && (!m_bIsTame)) + { + m_bIsRearing = true; + m_RearTickCount = 0; + } + else { m_TameAttemptTimes++; a_Player.AttachTo(this); |