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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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,
|
/* 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 */
|
but that is no longer the case so we just do a blanket assignment */
|
||||||
for (mon = fmon; mon; mon = mon->nmon)
|
for (mon = fmon; mon; mon = mon->nmon) {
|
||||||
if (!DEADMONSTER(mon)) mon->mlstmv = monstermoves;
|
if (DEADMONSTER(mon)) continue;
|
||||||
|
mon->mlstmv = monstermoves;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+11
-6
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1682,10 +1682,12 @@ int roomno;
|
|||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
register struct monst *mtmp;
|
||||||
|
|
||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if(!DEADMONSTER(mtmp) && mtmp->data == mdat &&
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
index(in_rooms(mtmp->mx, mtmp->my, 0), roomno + ROOMOFFSET))
|
if (mtmp->data == mdat &&
|
||||||
|
index(in_rooms(mtmp->mx, mtmp->my, 0), roomno + ROOMOFFSET))
|
||||||
return mtmp;
|
return mtmp;
|
||||||
|
}
|
||||||
return (struct monst *)0;
|
return (struct monst *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1940,8 +1942,11 @@ register boolean newlev;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rt == COURT || rt == SWAMP || rt == MORGUE || rt == ZOO)
|
if (rt == COURT || rt == SWAMP || rt == MORGUE || rt == ZOO)
|
||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (!DEADMONSTER(mtmp) && !Stealth && !rn2(3)) mtmp->msleeping = 0;
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
|
if (!Stealth && !rn2(3))
|
||||||
|
mtmp->msleeping = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -261,7 +261,7 @@ dosounds()
|
|||||||
"*a strident plea for donations.",
|
"*a strident plea for donations.",
|
||||||
};
|
};
|
||||||
const char *msg;
|
const char *msg;
|
||||||
int idx, trycount = 0,
|
int trycount = 0,
|
||||||
ax = EPRI(mtmp)->shrpos.x, ay = EPRI(mtmp)->shrpos.y;
|
ax = EPRI(mtmp)->shrpos.x, ay = EPRI(mtmp)->shrpos.y;
|
||||||
boolean speechless = (mtmp->data->msound <= MS_ANIMAL),
|
boolean speechless = (mtmp->data->msound <= MS_ANIMAL),
|
||||||
in_sight = canseemon(mtmp) || cansee(ax, ay);
|
in_sight = canseemon(mtmp) || cansee(ax, ay);
|
||||||
|
|||||||
+5
-3
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -136,9 +136,11 @@ findgd()
|
|||||||
{
|
{
|
||||||
register struct monst *mtmp;
|
register struct monst *mtmp;
|
||||||
|
|
||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if(mtmp->isgd && !DEADMONSTER(mtmp) && on_level(&(EGD(mtmp)->gdlevel), &u.uz))
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
|
if (mtmp->isgd && on_level(&(EGD(mtmp)->gdlevel), &u.uz))
|
||||||
return(mtmp);
|
return(mtmp);
|
||||||
|
}
|
||||||
return((struct monst *)0);
|
return((struct monst *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -75,8 +75,9 @@ amulet()
|
|||||||
if (!context.no_of_wizards)
|
if (!context.no_of_wizards)
|
||||||
return;
|
return;
|
||||||
/* find Wizard, and wake him if necessary */
|
/* find Wizard, and wake him if necessary */
|
||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (!DEADMONSTER(mtmp) && mtmp->iswiz && mtmp->msleeping && !rn2(40)) {
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
|
if (mtmp->iswiz && mtmp->msleeping && !rn2(40)) {
|
||||||
mtmp->msleeping = 0;
|
mtmp->msleeping = 0;
|
||||||
if (distu(mtmp->mx,mtmp->my) > 2)
|
if (distu(mtmp->mx,mtmp->my) > 2)
|
||||||
You(
|
You(
|
||||||
@@ -84,6 +85,7 @@ amulet()
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user