Skip to content

Commit

Permalink
When removing an object from the floor, force concealed hiders to unh…
Browse files Browse the repository at this point in the history
…ide. Fixes C343-308.

Conflicts:

	libnethack/src/invent.c
  • Loading branch information
Jared Minch authored and sgrunt committed May 3, 2012
1 parent b87f15d commit 4f0b9c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/invent.c
Expand Up @@ -632,6 +632,7 @@ delobj(obj)
register struct obj *obj;
{
boolean update_map;
struct monst *mtmp;

if (obj->otyp == AMULET_OF_YENDOR ||
obj->otyp == CANDELABRUM_OF_INVOCATION ||
Expand All @@ -646,6 +647,12 @@ register struct obj *obj;
}
update_map = (obj->where == OBJ_FLOOR);
obj_extract_self(obj);
if( !OBJ_AT_LEV(obj->olev, obj->ox, obj->oy) &&
(mtmp = m_at(obj->olev, obj->ox, obj->oy)) &&
mtmp->mundetected &&
hides_under(mtmp->data) ) {
mtmp->mundetected = 0;
}
if (update_map) newsym(obj->ox, obj->oy);
obfree(obj, (struct obj *) 0); /* frees contents also */
}
Expand Down

0 comments on commit 4f0b9c2

Please sign in to comment.