summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index a5818fbeb..b6576486c 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -514,7 +514,7 @@ void cChunk::GetThreeRandomNumbers(int & a_X, int & a_Y, int & a_Z, int a_MaxX,
);
// MTRand gives an inclusive range [0, Max] but this gives the exclusive range [0, Max)
- int OverallMax = (a_MaxX - 1) * (a_MaxY - 1) * (a_MaxZ - 1);
+ int OverallMax = (a_MaxX * a_MaxY * a_MaxZ) - 1;
int Random = m_World->GetTickRandomNumber(OverallMax);
a_X = Random % a_MaxX;