controlling u.ustuck

Setting or clearing u.ustuck now requires that context.botl be set,
so make a new routine to take care of both instead of manipulating
that pointer directly.
This commit is contained in:
PatR
2020-02-16 13:04:12 -08:00
parent c7ec28f4c7
commit 3981e3e6e5
15 changed files with 71 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mhitm.c $NHDT-Date: 1573773926 2019/11/14 23:25:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */
/* NetHack 3.6 mhitm.c $NHDT-Date: 1581886861 2020/02/16 21:01:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.130 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -146,8 +146,8 @@ register struct monst *mtmp;
if (monnear(mtmp, mon->mx, mon->my)) {
if (!u.uswallow && (mtmp == u.ustuck)) {
if (!rn2(4)) {
set_ustuck((struct monst *) 0);
pline("%s releases you!", Monnam(mtmp));
u.ustuck = 0;
} else
break;
}