summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Horse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Horse.cpp')
-rw-r--r--src/Mobs/Horse.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 978471b8d..acf79d3b1 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -41,16 +41,18 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
+ auto & Random = GetRandomProvider();
+
if (!m_bIsMouthOpen)
{
- if (m_World->GetTickRandomNumber(50) == 25)
+ if (Random.RandBool(0.02))
{
m_bIsMouthOpen = true;
}
}
else
{
- if (m_World->GetTickRandomNumber(10) == 5)
+ if (Random.RandBool(0.10))
{
m_bIsMouthOpen = false;
}
@@ -60,7 +62,7 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
if (m_TameAttemptTimes < m_TimesToTame)
{
- if (m_World->GetTickRandomNumber(50) == 25)
+ if (Random.RandBool(0.02))
{
m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::SOUTH_EAST));
m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::SOUTH_WEST));