1
0

Sixth round of fixes

* Made horse rearing time fixed instead of random
This commit is contained in:
Tiger Wang 2013-10-11 21:33:56 +01:00
parent e2aaf202ab
commit 327abdd10d
2 changed files with 9 additions and 4 deletions

View File

@ -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);

View File

@ -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;
} ;