aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/random.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/random.cpp b/common/random.cpp
index a74ab831ea..de1269b485 100644
--- a/common/random.cpp
+++ b/common/random.cpp
@@ -30,8 +30,12 @@ RandomSource::RandomSource(const String &name) {
// Use system time as RNG seed. Normally not a good idea, if you are using
// a RNG for security purposes, but good enough for our purposes.
assert(g_system);
- uint32 seed = g_eventRec.getRandomSeed(name);
- setSeed(seed);
+
+#ifdef ENABLE_EVENTRECORDER
+ setSeed(g_eventRec.getRandomSeed(name));
+#else
+ setSeed(g_system->getMillis());
+#endif
}
void RandomSource::setSeed(uint32 seed) {