replace x >= LOW_PM with ismnum(x) shorthand macro

This commit is contained in:
nhmall
2024-01-11 14:01:10 -05:00
parent 58031920dc
commit 25a8c258e6
31 changed files with 119 additions and 107 deletions

View File

@@ -531,7 +531,7 @@ restgamestate(NHFILE *nhfp)
newgamecontext = gc.context; /* copy statically init'd context */
if (nhfp->structlevel)
Mread(nhfp->fd, &gc.context, sizeof gc.context);
gc.context.warntype.species = (gc.context.warntype.speciesidx >= LOW_PM)
gc.context.warntype.species = (ismnum(gc.context.warntype.speciesidx))
? &mons[gc.context.warntype.speciesidx]
: (struct permonst *) 0;
/* gc.context.victual.piece, .tin.tin, .spellbook.book, and .polearm.hitmon