-/* SCCS Id: @(#)dog.c 3.5 2006/04/14 */
+/* SCCS Id: @(#)dog.c 3.5 2006/06/11 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* monst->mlstmv used to be updated every time `monst' actually moved,
but that is no longer the case so we just do a blanket assignment */
- for (mon = fmon; mon; mon = mon->nmon)
- if (!DEADMONSTER(mon)) mon->mlstmv = monstermoves;
+ for (mon = fmon; mon; mon = mon->nmon) {
+ if (DEADMONSTER(mon)) continue;
+ mon->mlstmv = monstermoves;
+ }
}
void
-/* SCCS Id: @(#)hack.c 3.5 2006/05/31 */
+/* SCCS Id: @(#)hack.c 3.5 2006/06/11 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
{
register struct monst *mtmp;
- for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if(!DEADMONSTER(mtmp) && mtmp->data == mdat &&
- index(in_rooms(mtmp->mx, mtmp->my, 0), roomno + ROOMOFFSET))
+ for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp)) continue;
+ if (mtmp->data == mdat &&
+ index(in_rooms(mtmp->mx, mtmp->my, 0), roomno + ROOMOFFSET))
return mtmp;
+ }
return (struct monst *)0;
}
}
}
if (rt == COURT || rt == SWAMP || rt == MORGUE || rt == ZOO)
- for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if (!DEADMONSTER(mtmp) && !Stealth && !rn2(3)) mtmp->msleeping = 0;
+ for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp)) continue;
+ if (!Stealth && !rn2(3))
+ mtmp->msleeping = 0;
+ }
}
}
"*a strident plea for donations.",
};
const char *msg;
- int idx, trycount = 0,
+ int trycount = 0,
ax = EPRI(mtmp)->shrpos.x, ay = EPRI(mtmp)->shrpos.y;
boolean speechless = (mtmp->data->msound <= MS_ANIMAL),
in_sight = canseemon(mtmp) || cansee(ax, ay);
-/* SCCS Id: @(#)vault.c 3.5 2006/01/03 */
+/* SCCS Id: @(#)vault.c 3.5 2006/06/11 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
{
register struct monst *mtmp;
- for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if(mtmp->isgd && !DEADMONSTER(mtmp) && on_level(&(EGD(mtmp)->gdlevel), &u.uz))
+ for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp)) continue;
+ if (mtmp->isgd && on_level(&(EGD(mtmp)->gdlevel), &u.uz))
return(mtmp);
+ }
return((struct monst *)0);
}
if (!context.no_of_wizards)
return;
/* find Wizard, and wake him if necessary */
- for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if (!DEADMONSTER(mtmp) && mtmp->iswiz && mtmp->msleeping && !rn2(40)) {
+ for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp)) continue;
+ if (mtmp->iswiz && mtmp->msleeping && !rn2(40)) {
mtmp->msleeping = 0;
if (distu(mtmp->mx,mtmp->my) > 2)
You(
);
return;
}
+ }
}
int