From e9c25be839a37685eefec69cb70bcdf5dc91bd87 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Wed, 15 Jan 2003 21:25:02 +0000 Subject: [PATCH] fix B17001 - Still no "the guard disappears" message A change I made last August broke this; it was checking whether you could see the guard after having removed him from the map. --- src/vault.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vault.c b/src/vault.c index a81322b1d..1c5409df5 100644 --- a/src/vault.c +++ b/src/vault.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)vault.c 3.4 2002/11/06 */ +/* SCCS Id: @(#)vault.c 3.4 2003/01/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -454,6 +454,8 @@ register struct monst *grd; long umoney = money_cnt(invent); register boolean u_carry_gold = ((umoney + hidden_gold()) > 0L); #endif + boolean see_guard; + if(!on_level(&(egrd->gdlevel), &u.uz)) return(-1); nx = ny = m = n = 0; if(!u_in_vault && !grd_in_vault) @@ -710,6 +712,7 @@ newpos: cleanup: x = grd->mx; y = grd->my; + see_guard = canspotmon(grd); wallify_vault(grd); remove_monster(grd->mx, grd->my); newsym(grd->mx,grd->my); @@ -719,7 +722,7 @@ cleanup: restfakecorr(grd); if(!semi_dead && (in_fcorridor(grd, u.ux, u.uy) || cansee(x, y))) { - if (!disappear_msg_seen && canspotmon(grd)) + if (!disappear_msg_seen && see_guard) pline("Suddenly, the %s disappears.", g_monnam(grd)); return(1); } -- 2.40.0