summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Horse.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-11 22:33:56 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-11 22:33:56 +0200
commit327abdd10daad7bb49fde185f1f5aee60a98ec1c (patch)
treeedddb203eb17e037c9e6370cc4ff065f36e9ef63 /source/Mobs/Horse.cpp
parentFifth round of fixes (diff)
downloadcuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar.gz
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar.bz2
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar.lz
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar.xz
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.tar.zst
cuberite-327abdd10daad7bb49fde185f1f5aee60a98ec1c.zip
Diffstat (limited to 'source/Mobs/Horse.cpp')
-rw-r--r--source/Mobs/Horse.cpp11
1 files changed, 8 insertions, 3 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);