Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2019-05-05 23:30:50 -04:00
18 changed files with 218 additions and 87 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dogmove.c $NHDT-Date: 1551493951 2019/03/02 02:32:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.72 $ */
/* NetHack 3.6 dogmove.c $NHDT-Date: 1557094801 2019/05/05 22:20:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.74 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -618,7 +618,6 @@ int after, udist, whappr;
return appr;
}
STATIC_OVL struct monst *
find_targ(mtmp, dx, dy, maxdist)
register struct monst *mtmp;
@@ -647,14 +646,13 @@ int maxdist;
if (!m_cansee(mtmp, curx, cury))
break;
targ = m_at(curx, cury);
if (curx == mtmp->mux && cury == mtmp->muy)
return &g.youmonst;
if (targ) {
if ((targ = m_at(curx, cury)) != 0) {
/* Is the monster visible to the pet? */
if ((!targ->minvis || perceives(mtmp->data)) && !targ->mundetected)
if ((!targ->minvis || perceives(mtmp->data))
&& !targ->mundetected)
break;
/* If the pet can't see it, it assumes it aint there */
targ = 0;
@@ -810,7 +808,6 @@ struct monst *mtmp, *mtarg;
return score;
}
STATIC_OVL struct monst *
best_target(mtmp)
struct monst *mtmp; /* Pet */
@@ -862,7 +859,6 @@ struct monst *mtmp; /* Pet */
return best_targ;
}
/* return 0 (no move), 1 (move) or 2 (dead) */
int
dog_move(mtmp, after)
@@ -1127,7 +1123,7 @@ int after; /* this is extra fast monster movement */
chcnt = 0;
chi = i;
}
nxti:
nxti:
;
}
@@ -1142,6 +1138,7 @@ int after; /* this is extra fast monster movement */
/* How hungry is the pet? */
if (!mtmp->isminion) {
struct edog *dog = EDOG(mtmp);
hungry = (g.monstermoves > (dog->hungrytime + 300));
}