summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Slime.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Slime.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index dca5c5887..3f832ae87 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -70,8 +70,8 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
if (m_Size != 1)
{
- cFastRandom Random;
- int SpawnAmount = 2 + Random.NextInt(3);
+ auto & Random = GetRandomProvider();
+ int SpawnAmount = Random.RandInt(2, 4);
for (int i = 0; i < SpawnAmount; ++i)
{
@@ -80,7 +80,7 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
cSlime * NewSlime = new cSlime(m_Size / 2);
NewSlime->SetPosition(GetPosX() + AddX, GetPosY() + 0.5, GetPosZ() + AddZ);
- NewSlime->SetYaw(Random.NextFloat(1.0f) * 360.0f);
+ NewSlime->SetYaw(Random.RandReal(360.0f));
m_World->SpawnMobFinalize(NewSlime);
}
}