]> granicus.if.org Git - nethack/commitdiff
fractured rock descriptions
authornethack.rankin <nethack.rankin>
Tue, 3 Aug 2004 03:40:08 +0000 (03:40 +0000)
committernethack.rankin <nethack.rankin>
Tue, 3 Aug 2004 03:40:08 +0000 (03:40 +0000)
     From a bug report:  fracture_rock() was unintentionally propagating
the boulder or statue's dknown flag to the resulting rocks, producing a
trivial but noticeable difference in description of "rock" vs "stone" if
the source object had been seen up close prior to being broken and the
rocks are then examined remotely or while blind.

     The curse/bless state is propagating too, but this seems reasonable
so I've left it alone.

doc/fixes34.4
src/zap.c

index 53409069a66cba6380cfc181f55f78634774ef95..9fbb077a1c91e787b503ae5539de8554c3fcf7f1 100644 (file)
@@ -44,6 +44,8 @@ shopkeeper removal of trap from shop doorway yields an open door instead of
 guarantee that hostile djinn released from bottles really are hostile
 handle lava when removing or losing water walking boots
 fix incomplete sentence occuring when unique monster's corpse fell down stairs
+fractured boulders or statues produced inconsistent object settings on the
+       resulting rocks
 
 
 Platform- and/or Interface-Specific Fixes
index 41f2f730542bedf087b8d0d92e1196c0992b17b3..f5f56dba8d26bac7cef2d1862dc38d0c766e13ac 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)zap.c      3.4     2004/06/12      */
+/*     SCCS Id: @(#)zap.c      3.4     2004/08/02      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -3866,10 +3866,11 @@ register struct obj *obj;                  /* no texts here! */
            change_luck(-1);
 
        obj->otyp = ROCK;
+       obj->oclass = GEM_CLASS;
        obj->quan = (long) rn1(60, 7);
        obj->owt = weight(obj);
-       obj->oclass = GEM_CLASS;
-       obj->known = FALSE;
+       obj->dknown = obj->bknown = obj->rknown = 0;
+       obj->known = objects[obj->otyp].oc_uses_known ? 0 : 1;
        obj->onamelth = 0;              /* no names */
        obj->oxlth = 0;                 /* no extra data */
        obj->oattached = OATTACHED_NOTHING;
@@ -3877,7 +3878,7 @@ register struct obj *obj;            /* no texts here! */
                obj_extract_self(obj);          /* move rocks back on top */
                place_object(obj, obj->ox, obj->oy);
                if(!does_block(obj->ox,obj->oy,&levl[obj->ox][obj->oy]))
-                       unblock_point(obj->ox,obj->oy);
+                   unblock_point(obj->ox,obj->oy);
                if(cansee(obj->ox,obj->oy))
                    newsym(obj->ox,obj->oy);
        }