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:
Patric Mueller
2019-01-11 19:23:01 +01:00
parent 86d694c61b
commit 52d4b1a1aa
3 changed files with 16 additions and 0 deletions

View File

@@ -982,6 +982,8 @@ mklev()
struct mkroom *croom;
int ridx;
reseed_random();
init_mapseen(&u.uz);
if (getbones())
return;
@@ -1009,6 +1011,8 @@ mklev()
entered; rooms[].orig_rtype always retains original rtype value */
for (ridx = 0; ridx < SIZE(rooms); ridx++)
rooms[ridx].orig_rtype = rooms[ridx].rtype;
reseed_random();
}
void