# HG changeset patch # User rubidium # Date 1156414799 0 # Node ID 02b9ab2cf501dbdaf40e77b8dbba35d537ff7f5c # Parent a0c7a1197785d082cf73339183d85b0b8fcfdd48 (svn r6086) -Fix: InteractiveRandom was not seeded properly resulting in the dedicated server always generating the same map. Thanks to the #openttdcoop team for detecting. diff -r a0c7a1197785 -r 02b9ab2cf501 os2.c --- a/os2.c Thu Aug 24 10:11:32 2006 +0000 +++ b/os2.c Thu Aug 24 10:19:59 2006 +0000 @@ -125,8 +125,7 @@ // change the working directory to enable doubleclicking in UIs ChangeWorkingDirectory(argv[0]); - _random_seeds[0][1] = _random_seeds[0][0] = time(NULL); - + _random_seeds[1][1] = _random_seeds[1][0] = _random_seeds[0][1] = _random_seeds[0][0] = time(NULL); return ttd_main(argc, argv); } diff -r a0c7a1197785 -r 02b9ab2cf501 unix.c --- a/unix.c Thu Aug 24 10:11:32 2006 +0000 +++ b/unix.c Thu Aug 24 10:19:59 2006 +0000 @@ -151,7 +151,7 @@ ChangeWorkingDirectory(argv[0]); #endif - _random_seeds[0][1] = _random_seeds[0][0] = time(NULL); + _random_seeds[1][1] = _random_seeds[1][0] = _random_seeds[0][1] = _random_seeds[0][0] = time(NULL); SeedMT(_random_seeds[0][1]); signal(SIGPIPE, SIG_IGN); diff -r a0c7a1197785 -r 02b9ab2cf501 win32.c --- a/win32.c Thu Aug 24 10:11:32 2006 +0000 +++ b/win32.c Thu Aug 24 10:19:59 2006 +0000 @@ -859,8 +859,8 @@ _set_error_mode(_OUT_TO_MSGBOX); // force assertion output to messagebox // setup random seed to something quite random - _random_seeds[0][0] = GetTickCount(); - _random_seeds[0][1] = _random_seeds[0][0] * 0x1234567; + _random_seeds[1][0] = _random_seeds[0][0] = GetTickCount(); + _random_seeds[1][1] = _random_seeds[0][1] = _random_seeds[0][0] * 0x1234567; SeedMT(_random_seeds[0][0]); argc = ParseCommandLine(GetCommandLine(), argv, lengthof(argv));