From: nethack.rankin Date: Wed, 15 Jan 2003 21:25:02 +0000 (+0000) Subject: fix B17001 - Still no "the guard disappears" message X-Git-Tag: MOVE2GIT~2230 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9c25be839a37685eefec69cb70bcdf5dc91bd87;p=nethack 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. --- 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); }