reseed during level change to prevent deduction of rng state
For platforms that read from the system's random number generator, reseed during level change, before the map of a new level is created and after level creation has finished.
This commit is contained in:
@@ -917,6 +917,17 @@ init_random()
|
||||
set_random(seed);
|
||||
}
|
||||
|
||||
/* Reshuffles the random number generator. */
|
||||
void
|
||||
reseed_random()
|
||||
{
|
||||
/* only reseed if we are certain that the seed generation is unguessable
|
||||
* by the players. */
|
||||
#ifdef DEV_RANDOM
|
||||
init_random();
|
||||
#endif
|
||||
}
|
||||
|
||||
time_t
|
||||
getnow()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user