recalc_mapseen() followup
Update several places where lazy lastseentyp[] might be an issue. I think it isn't updated in a timely fashion when newsym() shows a spot covered by an object or trap, but didn't manage to find any cases where that caused a problem. This is more in the nature of a precaution.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 lock.c $NHDT-Date: 1654464994 2022/06/05 21:36:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.114 $ */
|
||||
/* NetHack 3.7 lock.c $NHDT-Date: 1703070191 2023/12/20 11:03:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.131 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -569,7 +569,7 @@ pick_lock(
|
||||
}
|
||||
if (!IS_DOOR(door->typ)) {
|
||||
int res = PICKLOCK_DID_NOTHING, oldglyph = door->glyph;
|
||||
schar oldlastseentyp = gl.lastseentyp[cc.x][cc.y];
|
||||
schar oldlastseentyp = update_mapseen_for(cc.x, cc.y);
|
||||
|
||||
/* this is probably only relevant when blind */
|
||||
feel_location(cc.x, cc.y);
|
||||
@@ -819,7 +819,7 @@ doopen_indir(coordxy x, coordxy y)
|
||||
/* this used to be 'if (Blind)' but using a key skips that so we do too */
|
||||
{
|
||||
int oldglyph = door->glyph;
|
||||
schar oldlastseentyp = gl.lastseentyp[cc.x][cc.y];
|
||||
schar oldlastseentyp = update_mapseen_for(cc.x, cc.y);
|
||||
|
||||
newsym(cc.x, cc.y);
|
||||
if (door->glyph != oldglyph
|
||||
@@ -979,7 +979,7 @@ doclose(void)
|
||||
portcullis = (is_drawbridge_wall(x, y) >= 0);
|
||||
if (Blind) {
|
||||
int oldglyph = door->glyph;
|
||||
schar oldlastseentyp = gl.lastseentyp[x][y];
|
||||
schar oldlastseentyp = update_mapseen_for(x, y);
|
||||
|
||||
feel_location(x, y);
|
||||
if (door->glyph != oldglyph || gl.lastseentyp[x][y] != oldlastseentyp)
|
||||
|
||||
Reference in New Issue
Block a user