Sixth round of fixes
* Made horse rearing time fixed instead of random
This commit is contained in:
parent
e2aaf202ab
commit
327abdd10d
@ -22,7 +22,8 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
|
|||||||
m_Style(Style),
|
m_Style(Style),
|
||||||
m_Armour(0),
|
m_Armour(0),
|
||||||
m_TimesToTame(TameTimes),
|
m_TimesToTame(TameTimes),
|
||||||
m_TameAttemptTimes(0)
|
m_TameAttemptTimes(0),
|
||||||
|
m_RearTickCount(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,10 +71,14 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_bIsRearing) && (m_World->GetTickRandomNumber(15) == 6))
|
if (m_bIsRearing)
|
||||||
|
{
|
||||||
|
if (m_RearTickCount == 20)
|
||||||
{
|
{
|
||||||
m_bIsRearing = false;
|
m_bIsRearing = false;
|
||||||
}
|
}
|
||||||
|
else { m_RearTickCount++;}
|
||||||
|
}
|
||||||
|
|
||||||
m_World->BroadcastEntityMetadata(*this);
|
m_World->BroadcastEntityMetadata(*this);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
bool m_bHasChest, m_bIsEating, m_bIsRearing, m_bIsMouthOpen, m_bIsTame, m_bIsSaddled;
|
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;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user