From 4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 6 Jul 2013 23:54:45 -0400 Subject: ALL: Don't use EventRecorder at all when not compiled in --- common/random.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common') 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) { -- cgit v1.2.3