From f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Wed, 14 Jun 2017 16:35:34 +0100 Subject: Remove sign conversion --- src/Chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Chunk.cpp') 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; -- cgit v1.2.3