summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Mobs/Horse.cpp11
-rw-r--r--source/Mobs/Horse.h2
2 files changed, 9 insertions, 4 deletions
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);
diff --git a/source/Mobs/Horse.h b/source/Mobs/Horse.h
index d80678845..be0c23f9b 100644
--- a/source/Mobs/Horse.h
+++ b/source/Mobs/Horse.h
@@ -35,7 +35,7 @@ public:
private:
bool m_bHasChest, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame, m_bIsSaddled;
- int m_Type, m_Color, m_Style, m_Armour, m_TimesToTame, m_TameAttemptTimes;
+ int m_Type, m_Color, m_Style, m_Armour, m_TimesToTame, m_TameAttemptTimes, m_RearTickCount;
} ;