]> granicus.if.org Git - nethack/commitdiff
in_lava_effects (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 11 Dec 2005 03:09:05 +0000 (03:09 +0000)
committernethack.rankin <nethack.rankin>
Sun, 11 Dec 2005 03:09:05 +0000 (03:09 +0000)
     The in_lava_effects flag should never be saved and restored; putting
it into the context struct was a mistake.  Move it to the iflags struct
(where the branch code already has it).  I haven't bumped the EDITLEVEL
setting.  Save and bones files from more that a few days ago were breifly
invalid but should be viable again.  Save and bones files from the past
couple of days are now no good; sorry about that.

include/context.h
include/flag.h
src/do_wear.c
src/trap.c

index 676cabf544dbbcc357ae2ae29a40870b45ce8f10..3e8ae378101b3a01a1186decf0ef2c04ef638044 100644 (file)
@@ -80,7 +80,6 @@ struct context_info {
                                /* 8: travel */
        unsigned startingpet_mid;
        int      warnlevel;
-       int      in_lava_effects;       /* hack for Boots_off() */
        long next_attrib_check; /* next attribute check */
        long stethoscope_move;
        short stethoscope_movement;
index 4d738c01a357683371edb343f80f3c3215a43edd..5a8c1e898a6f6ce6f282dab291ceb878bb009ef9 100644 (file)
@@ -166,9 +166,10 @@ struct instance_flags {
                                  * on some non-move commands */
        boolean  zerocomp;      /* write zero-compressed save files */
        boolean  rlecomp;       /* run-length comp of levels when writing savefile */
-       uchar num_pad_mode;
-       int     menu_headings;  /* ATR for menu headings */
-       int      purge_monsters;        /* # of dead monsters still on fmon list */
+       uchar    num_pad_mode;
+       int      in_lava_effects;       /* hack for Boots_off() */
+       int      menu_headings; /* ATR for menu headings */
+       int      purge_monsters;        /* # of dead monsters still on fmon list */
        int *opt_booldup;       /* for duplication of boolean opts in config file */
        int *opt_compdup;       /* for duplication of compound opts in config file */
        uchar   bouldersym;     /* symbol for boulder display */
index 4857c5a1c673f7f96c8aee18f85228fa9d9f1392..eff0abea33e5752a53e71430e318d9372be2fec6 100644 (file)
@@ -154,7 +154,7 @@ Boots_off()
                    !Levitation && !Flying && !is_clinger(youmonst.data) &&
                    !context.takeoff.cancelled_don &&
                    /* avoid recursive call to lava_effects() */   
-                   !context.in_lava_effects) {
+                   !iflags.in_lava_effects) {
                        /* make boots known in case you survive the drowning */
                        makeknown(otyp);
                        spoteffects(TRUE);
index ec60c7fca3441c196763db1d90aafe3f5c371b5f..3eef5a1831ffee7a379f33cd873039906a8315d6 100644 (file)
@@ -4127,7 +4127,7 @@ lava_effects()
           which would successfully delete (via useupall) the no-longer-worn
           boots; once recursive call returned, we would try to delete them
           again here in the outer call (access stale memory, probably panic) */
-       context.in_lava_effects++;
+       iflags.in_lava_effects++;
 
        for(obj = invent; obj; obj = obj2) {
            obj2 = obj->nobj;
@@ -4157,7 +4157,7 @@ lava_effects()
            }
        }
 
-       context.in_lava_effects--;
+       iflags.in_lava_effects--;
 
        /* s/he died... */
        u.uhp = -1;