Monster known traps bit twiddling

This commit is contained in:
Pasi Kallinen
2022-08-21 11:36:39 +03:00
parent 96e9534289
commit 953d43f5ac
10 changed files with 47 additions and 18 deletions

View File

@@ -2075,7 +2075,7 @@ mfndpos(
&& !is_whirly(mdat) && !unsolid(mdat)))
&& (ttmp->ttyp != ANTI_MAGIC || !resists_magm(mon))) {
if (!(flag & ALLOW_TRAPS)) {
if (mon->mtrapseen & (1L << (ttmp->ttyp - 1)))
if (mon_knows_traps(mon, ttmp->ttyp))
continue;
}
info[cnt] |= ALLOW_TRAPS;