From 360d8eade0332f2c1aa5c205ca772cd506c35b26 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Tue, 13 Jun 2017 20:35:30 +0100 Subject: FastRandom rewrite (#3754) --- src/Blocks/BlockDirt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Blocks/BlockDirt.h') diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h index 33325d53a..3712e22f7 100644 --- a/src/Blocks/BlockDirt.h +++ b/src/Blocks/BlockDirt.h @@ -70,12 +70,12 @@ public: } // Grass spreads to adjacent dirt blocks: - cFastRandom rand; + auto & rand = GetRandomProvider(); for (int i = 0; i < 2; i++) // Pick two blocks to grow to { - int OfsX = rand.NextInt(3) - 1; // [-1 .. 1] - int OfsY = rand.NextInt(5) - 3; // [-3 .. 1] - int OfsZ = rand.NextInt(3) - 1; // [-1 .. 1] + int OfsX = rand.RandInt(-1, 1); + int OfsY = rand.RandInt(-3, 1); + int OfsZ = rand.RandInt(-1, 1); BLOCKTYPE DestBlock; NIBBLETYPE DestMeta; -- cgit v1.2.3