Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -465,4 +465,20 @@ wd_message()
|
||||
You("are in non-scoring explore/discovery mode.");
|
||||
}
|
||||
|
||||
unsigned long
|
||||
sys_random_seed()
|
||||
{
|
||||
unsigned long seed;
|
||||
unsigned long pid = (unsigned long) getpid();
|
||||
|
||||
seed = (unsigned long) getnow(); /* time((TIME_type) 0) */
|
||||
/* Quick dirty band-aid to prevent PRNG prediction */
|
||||
if (pid) {
|
||||
if (!(pid & 3L))
|
||||
pid -= 1L;
|
||||
seed *= pid;
|
||||
}
|
||||
return seed;
|
||||
}
|
||||
|
||||
/*vmsmain.c*/
|
||||
|
||||
Reference in New Issue
Block a user