]> granicus.if.org Git - nethack/commitdiff
vision thing
authorcohrs <cohrs>
Fri, 18 Mar 2005 05:34:43 +0000 (05:34 +0000)
committercohrs <cohrs>
Fri, 18 Mar 2005 05:34:43 +0000 (05:34 +0000)
<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.

doc/fixes34.4
src/dothrow.c

index 5d09fea56563b4a984e3ae06c7dffa9242f25311..39e5f3a0d3f4a3737d5319a997bcf87853adf61a 100644 (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
index 45240e0d61e86f809871c6321ac6e8218732cff8..d992603ad5e8ce31432440999a81537b81659981 100644 (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);