summaryrefslogtreecommitdiffstats
path: root/src/FastRandom.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 14:08:45 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 14:08:45 +0200
commite3aa6e48577f3247653e94a76b68a4626a630c65 (patch)
tree2efec4c43cab7bff0173ad68ef0ab4400addf6dd /src/FastRandom.cpp
parentcWorld: Fixed scheduler. (diff)
downloadcuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.gz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.bz2
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.lz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.xz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.zst
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.zip
Diffstat (limited to '')
-rw-r--r--src/FastRandom.cpp11
1 files changed, 9 insertions, 2 deletions
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;
+ }
}