vision thing

<Someone> reported: You kill it! A potion of invisibility shatters!
Change the rule in hero_breaks() to avoid giving info for things out of
sight, except when from_invent is set, to preserve desired behavior.
This commit is contained in:
cohrs
2005-03-18 05:34:43 +00:00
parent 5e7e8a5e5f
commit 361e020847
2 changed files with 2 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ only prefix shopkeeper names with "Mr." or "Ms." when not a personal name
green slime should not affect noncorporeal monsters
land mine explosion will destroy a drawbridge at same location
avoid some more buffer overflows in query buffers containing object names
avoid giving extra information about things that break out of sight
Platform- and/or Interface-Specific Fixes

View File

@@ -1538,7 +1538,7 @@ struct obj *obj;
xchar x, y; /* object location (ox, oy may not be right) */
boolean from_invent; /* thrown or dropped by player; maybe on shop bill */
{
boolean in_view = !Blind;
boolean in_view = Blind ? FALSE : (from_invent || cansee(x, y));
if (!breaktest(obj)) return 0;
breakmsg(obj, in_view);
breakobj(obj, x, y, TRUE, from_invent);