From: Wolfgang Becker Date: Fri, 7 Jul 2006 19:01:18 +0000 (+0000) Subject: Fixed uninitialized random problem on starting level via command line. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1c229bd477df1f1236faa1dac5d67ec0311ba6d9;p=supertux.git Fixed uninitialized random problem on starting level via command line. SVN-Revision: 3933 --- 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);