follow-up

adjust the mon_offmap(mon) macro to test any of the bits that
constitute being off the map, while ignoring some of the other bits
that do not.
This commit is contained in:
nhmall
2026-07-30 22:30:34 -04:00
parent 59080106b9
commit 1e749c28ce
2 changed files with 6 additions and 4 deletions
+4 -1
View File
@@ -257,7 +257,10 @@ struct monst {
#define mon_perma_blind(mon) (!mon->mcansee && !mon->mblinded)
#define mon_offmap(mon) ((mon)->mstate != MON_FLOOR)
#define MON_OFF_MAP_BITS (MON_OFFMAP | MON_DETACH | MON_LIMBO | MON_MIGRATING \
| MON_ENDGAME_FREE | MON_ENDGAME_MIGR | MON_BUBBLEMOVE)
#define mon_offmap(mon) (((mon)->mstate & (MON_OFF_MAP_BITS)) != 0)
/* Get the maximum difficulty monsters that can currently be generated,
given the current level difficulty and the hero's level. */
+2 -3
View File
@@ -935,11 +935,10 @@ place_monster(struct monst *mon, coordxy x, coordxy y)
bits that may be set. We'll probably make MON_FLOOR an
actual bit one day */
mon->mstate &= ~(MON_OFFMAP | MON_DETACH | MON_LIMBO | MON_MIGRATING
| MON_ENDGAME_FREE | MON_ENDGAME_MIGR);
mon->mstate &= ~(MON_OFF_MAP_BITS);
/* We don't mess with these bits above:
MON_BUBBLEMOVE | MON_OBLITERATE | MON_STILL_ARRIVING | MON_PARKED
MON_OBLITERATE | MON_STILL_ARRIVING | MON_PARKED
*/
}