mimics vs DUNGEON_OVERVIEW (trunk only)

Noticed while looking into whether I could use DUNGEON_OVERVIEW data
for something useful, it was recording accurate terrain type for locations
covered by mimics who were mimicking furniture (such as stairs or altars).
Hero should remember the fake terrain rather than whatever is actually
underneath the mimic.

     No fixes entry; user-contributed DUNGEON_OVERVIEW is post-3.4.3 code.
This commit is contained in:
nethack.rankin
2011-12-05 03:17:36 +00:00
parent eef41ba4a8
commit 73a934f6f6
4 changed files with 75 additions and 11 deletions

View File

@@ -414,9 +414,16 @@ display_monster(x, y, mon, sightflags, worm_tail)
* mappearance is currently set to an S_ index value in
* makemon.c.
*/
register int glyph = cmap_to_glyph(mon->mappearance);
int sym = mon->mappearance, glyph = cmap_to_glyph(sym);
levl[x][y].glyph = glyph;
if (!sensed) show_glyph(x,y, glyph);
if (!sensed) {
show_glyph(x,y, glyph);
#ifdef DUNGEON_OVERVIEW
/* override real topology with mimic's fake one */
lastseentyp[x][y] = cmap_to_type(sym);
#endif
}
break;
}