diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-06-14 17:35:34 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-06-16 07:07:02 +0200 |
commit | f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3 (patch) | |
tree | 4e418ba9a31e4d1d4bcac6c0adb468ac32636569 /src/Chunk.cpp | |
parent | Entity: Replaced a mutexed counter with a std::atomic. (#3773) (diff) | |
download | cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.gz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.bz2 cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.lz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.xz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.zst cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.zip |
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 2 |
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; |