[rec.games.hack] Another NetHack bug

ralf@b.gp.cs.cmu.edu (Ralf Brown) (08/06/87)

I was having trouble getting my dog to follow me down to level 2--even when it
was on a leash (as I was lucky enough to find one once).  When I got back up
from level 2, the screen was displayed with the dog right where it was when I
went down.  However, when I moved to the square, there was no warning, and 
when I moved off, the dog had disappeared.

The real clue, however, was when I walked right through an enormous rock, and
it disappeared just like the dog.

I turns out that if DGK is #defined (one of the sets of enhancements), the
monsters, gold, and objects on the current level get wiped out before they
get saved!

The fix is this change (in savelev0 of lev.c):

        fgold = 0;
        ftrap = 0;
        fmon = 0;
        fobj = 0;
----
#ifdef DGK
        if (!count_only)
#endif
                {
                fgold = 0;
                ftrap = 0;
                fmon = 0;
                fobj = 0;
                }
----

-- 
-=-=-=-=-=-=-=-= {harvard,seismo,ucbvax}!b.gp.cs.cmu.edu!ralf =-=-=-=-=-=-=-=-
ARPAnet: RALF@B.GP.CS.CMU.EDU            BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA
AT&Tnet: (412) 268-3053 (school)         FIDOnet: Ralf Brown at 129/31
	        DISCLAIMER?  Who ever said I claimed anything? 
"I do not fear computers.  I fear the lack of them..." -- Isaac Asimov