From e3aa6e48577f3247653e94a76b68a4626a630c65 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Wed, 15 Oct 2014 14:08:45 +0200 Subject: Enchanted books generate in MineShafts chests --- src/FastRandom.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/FastRandom.cpp') diff --git a/src/FastRandom.cpp b/src/FastRandom.cpp index 42bf5f3f9..052d976da 100644 --- a/src/FastRandom.cpp +++ b/src/FastRandom.cpp @@ -90,10 +90,17 @@ int cFastRandom::m_SeedCounter = 0; -cFastRandom::cFastRandom(void) : - m_Seed(m_SeedCounter++), +cFastRandom::cFastRandom(int a_Seed) : m_Counter(0) { + if (a_Seed == -1) + { + m_Seed = m_SeedCounter++; + } + else + { + m_Seed = a_Seed; + } } -- cgit v1.2.3