build warning
- remove an unreferenced variable - continue with recent code trend towards having DEADMONSTER() check in its own if/continue statement in a few more places
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -207,8 +207,10 @@ update_mlstmv()
|
||||
|
||||
/* 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
|
||||
|
||||
17
src/hack.c
17
src/hack.c
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -1682,10 +1682,12 @@ int roomno;
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1940,8 +1942,11 @@ register boolean newlev;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ dosounds()
|
||||
"*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);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -136,9 +136,11 @@ findgd()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,9 @@ amulet()
|
||||
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(
|
||||
@@ -84,6 +85,7 @@ amulet()
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user