# HG changeset patch # User rubidium # Date 1156414799 0 # Node ID 3812b4335df94c78b55d763f559d733cb20398f2 # Parent dd7b808c5f96d3111843a7b4ca3a6d10ad044e16 (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 dd7b808c5f96 -r 3812b4335df9 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 dd7b808c5f96 -r 3812b4335df9 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 dd7b808c5f96 -r 3812b4335df9 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));