objects: add BUGFIX for AddShrine (#2272)

This commit is contained in:
Robin
2022-03-23 21:51:47 -05:00
committed by GitHub
parent a44cb36af6
commit f074a33cc1
+6
View File
@@ -1438,6 +1438,12 @@ void AddShrine(int i)
#else
int j;
#endif
// BUGFIX: the seed of shrine objects (object[i]._oRndSeed) was never
// initialized. This lead to undefined behaviour, as the shrine object would
// use whatever value was present in memory (often the seed of an object with
// the same object index of a previous dungeon level).
object[i]._oPreFlag = TRUE;
for (j = 0; j < NUM_SHRINETYPE; j++) {
if (currlevel < shrinemin[j] || currlevel > shrinemax[j]) {