summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDirt.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-30 23:13:13 +0200
committermadmaxoft <github@xoft.cz>2014-03-30 23:13:13 +0200
commit8288e53c0be9f4f746a045d5ce8fca6bf6799824 (patch)
treeadef764ead23457fe7963596d0e9c181fa879f7e /src/Blocks/BlockDirt.h
parentFixed a few clang warnings. (diff)
downloadcuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar.gz
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar.bz2
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar.lz
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar.xz
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.tar.zst
cuberite-8288e53c0be9f4f746a045d5ce8fca6bf6799824.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockDirt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index a1ab74257..aa24b8668 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -2,7 +2,7 @@
#pragma once
#include "BlockHandler.h"
-#include "../MersenneTwister.h"
+#include "../FastRandom.h"
@@ -44,12 +44,12 @@ public:
}
// Grass spreads to adjacent dirt blocks:
- MTRand rand; // TODO: Replace with cFastRandom
+ cFastRandom rand;
for (int i = 0; i < 2; i++) // Pick two blocks to grow to
{
- int OfsX = rand.randInt(2) - 1; // [-1 .. 1]
- int OfsY = rand.randInt(4) - 3; // [-3 .. 1]
- int OfsZ = rand.randInt(2) - 1; // [-1 .. 1]
+ int OfsX = rand.NextInt(3, a_RelX) - 1; // [-1 .. 1]
+ int OfsY = rand.NextInt(5, a_RelY) - 3; // [-3 .. 1]
+ int OfsZ = rand.NextInt(3, a_RelZ) - 1; // [-1 .. 1]
BLOCKTYPE DestBlock;
NIBBLETYPE DestMeta;