From: nethack.rankin Date: Tue, 3 Aug 2004 03:40:08 +0000 (+0000) Subject: fractured rock descriptions X-Git-Tag: MOVE2GIT~1433 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ad0b6ea0cde2c212105a8dcadd15d90c1c2cdab;p=nethack fractured rock descriptions 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. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 53409069a..9fbb077a1 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/zap.c b/src/zap.c index 41f2f7305..f5f56dba8 100644 --- 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); }