leash groundwork

Add another parameter to m_unleash.  This should not introduce
any change in behavior.
This commit is contained in:
nethack.rankin
2002-03-11 08:00:21 +00:00
parent bc8acf4a29
commit 6c91a6bc04
6 changed files with 22 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mon.c 3.4 2002/02/07 */
/* SCCS Id: @(#)mon.c 3.4 2002/03/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1241,7 +1241,7 @@ m_detach(mtmp, mptr)
struct monst *mtmp;
struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */
{
if(mtmp->mleashed) m_unleash(mtmp);
if (mtmp->mleashed) m_unleash(mtmp, FALSE);
/* to prevent an infinite relobj-flooreffects-hmon-killed loop */
mtmp->mtrapped = 0;
mtmp->mhp = 0; /* simplify some tests: force mhp to 0 */