From 327abdd10daad7bb49fde185f1f5aee60a98ec1c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 11 Oct 2013 21:33:56 +0100 Subject: Sixth round of fixes * Made horse rearing time fixed instead of random --- source/Mobs/Horse.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source/Mobs/Horse.cpp') diff --git a/source/Mobs/Horse.cpp b/source/Mobs/Horse.cpp index caa1a3deb..46e7969cc 100644 --- a/source/Mobs/Horse.cpp +++ b/source/Mobs/Horse.cpp @@ -22,7 +22,8 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : m_Style(Style), m_Armour(0), m_TimesToTame(TameTimes), - m_TameAttemptTimes(0) + m_TameAttemptTimes(0), + m_RearTickCount(0) { } @@ -70,9 +71,13 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk) } } - if ((m_bIsRearing) && (m_World->GetTickRandomNumber(15) == 6)) + if (m_bIsRearing) { - m_bIsRearing = false; + if (m_RearTickCount == 20) + { + m_bIsRearing = false; + } + else { m_RearTickCount++;} } m_World->BroadcastEntityMetadata(*this); -- cgit v1.2.3