K 10 svn:author V 7 freeciv K 8 svn:date V 27 1998-10-29T09:34:31.000000Z K 7 svn:log V 1338 dwp@mso.anu.edu.au: Deterministic platform-independent pseudo-random number generator, from patch submitted by Cedric Tefft . Also added "to_client" field to settings (server options), to avoid sending the random seeds (and also saveturns and scorelog) when the client requests "report server options" (--dwp). Notes from Cedric: 1) Although the PRNG seed is an unsigned 32-bit int, neither the game file nor the server options know how to deal with any numbers other than signed integers (no longs, no unsigned ints, etc.), so in a few places I've had to strip the high bit off of the seed in order to ensure consistency across platforms. 2) The maximum value for the map seed is now limited to the maximum value for the random number generator seed instead of 50000 (which I suspect was chosen somewhat arbitrarily anyway). 3) I modified the map generator a tiny bit so that the map seed variable takes on the value actually used to generate the map (assuming it was zero to begin with). Previously, a "random" map seed was used to generate a new map, but this value was never stored anywhere, so there was no reliable way to reproduce any randomly generated map. 4) If anybody has questions about the algorithm, please see the code. Believe it or not, I've actually included a relevant comment or two. ;-> END