From 1c229bd477df1f1236faa1dac5d67ec0311ba6d9 Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Fri, 7 Jul 2006 19:01:18 +0000 Subject: [PATCH] Fixed uninitialized random problem on starting level via command line. SVN-Revision: 3933 --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3cefdc1b4..380369357 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -481,11 +481,13 @@ int main(int argc, char** argv) main_loop->push_screen(new WorldMapNS::WorldMap( FileSystem::basename(config->start_level))); } else { + init_rand();//If level uses random eg. for + // rain particles before we do this: std::auto_ptr session ( new GameSession(FileSystem::basename(config->start_level))); config->random_seed =session->get_demo_random_seed(config->start_demo); - init_rand(); + init_rand();//initialise generator with seed from session if(config->start_demo != "") session->play_demo(config->start_demo); -- 2.11.0