summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index df9292fae..663713cf3 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -820,10 +820,12 @@ void cChunk::TickBlocks(void)
// Tick random blocks, but the first one should be m_BlockToTick (so that SetNextBlockToTick() works)
auto Idx = cChunkDef::MakeIndexNoCheck(m_BlockToTick);
+ auto & Random = GetRandomProvider();
+
for (int i = 0; i < 50; ++i)
{
auto Pos = cChunkDef::IndexToCoordinate(static_cast<size_t>(Idx));
- Idx = m_World->GetTickRandomNumber(cChunkDef::NumBlocks - 1);
+ Idx = Random.RandInt(cChunkDef::NumBlocks - 1);
if (Pos.y > cChunkDef::GetHeight(m_HeightMap, Pos.x, Pos.z))
{
continue; // It's all air up here