mklev() set xxstairs_room pointers back to NULL upon completion.
When mklev() is called multiple times, previous state stored in the xxstairs_room pointers can be mistakenly used when making decisions about the new level being constructed. This caused non-deterministic level creation behavior when replaying from a snapshot.
This commit is contained in:
@@ -1016,6 +1016,10 @@ mklev()
|
||||
for (ridx = 0; ridx < SIZE(rooms); ridx++)
|
||||
rooms[ridx].orig_rtype = rooms[ridx].rtype;
|
||||
|
||||
dnstairs_room = NULL;
|
||||
upstairs_room = NULL;
|
||||
sstairs_room = NULL;
|
||||
|
||||
reseed_random(rn2);
|
||||
reseed_random(rn2_on_display_rng);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user