]> granicus.if.org Git - nethack/commitdiff
obj->spe usage again
authorPatR <rankin@nethack.org>
Fri, 8 Jan 2021 23:45:04 +0000 (15:45 -0800)
committerPatR <rankin@nethack.org>
Fri, 8 Jan 2021 23:45:04 +0000 (15:45 -0800)
uball->spe used to be used during restore way back in 2.3e.
There hasn't been any any point in setting it when starting
punishment and clearing it when ending punishment for decades
so get rid of that.

Nearly as ancient--but not quite--back in 3.10 patchlevel N,
obj->spe was set to -1 when the Amulet of Yendor was saved in
a bones file.  That was to flag it as fake, before the cheap
plastic imitation got added as a separate object.

So obj->spe isn't "special for uball and amulet" any more.

include/obj.h
src/read.c

index 394d84c71857453753068f9bd2b8b1ae80e77c36..841b825d423745deb3ab71e44e47aa5c35facb52 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 obj.h   $NHDT-Date: 1610056944 2021/01/07 22:02:24 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.83 $ */
+/* NetHack 3.7 obj.h   $NHDT-Date: 1610149501 2021/01/08 23:45:01 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Michael Allison, 2006. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -51,10 +51,9 @@ struct obj {
                 * Schroedinger's Box (1) or royal coffers for a court (2);
                 * named fruit index;
                 * candy bar wrapper index;
-                * special for uball and amulet;
                 * scroll of mail (normal==0, bones or wishing==1, written==2);
                 * splash of venom (normal==0, wishing==1);
-                * historic and gender for statues */
+                * historic flag and gender for statues */
 #define STATUE_HISTORIC 0x01
 #define STATUE_MALE 0x02
 #define STATUE_FEMALE 0x04
index ba6fa214f13e3935d6e97274ad0a389f643fafe2..94eb0fabaaacdad43bdd098fcee8b4e03d379a2e 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 read.c  $NHDT-Date: 1609323865 2020/12/30 10:24:25 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.214 $ */
+/* NetHack 3.7 read.c  $NHDT-Date: 1610149501 2021/01/08 23:45:01 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.216 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -2399,7 +2399,6 @@ struct obj *sobj;
         setworn(mkobj(BALL_CLASS, TRUE), W_BALL);
     else
         setworn(reuse_ball, W_BALL);
-    uball->spe = 1; /* special ball (see save) */
 
     /*
      *  Place ball & chain if not swallowed.  If swallowed, the ball & chain
@@ -2424,8 +2423,7 @@ unpunish()
     newsym(uchain->ox, uchain->oy);
     setworn((struct obj *) 0, W_CHAIN); /* sets 'uchain' to Null */
     dealloc_obj(savechain);
-    /* ball persists */
-    uball->spe = 0;
+    /* the chain is gone but the no longer attached ball persists */
     setworn((struct obj *) 0, W_BALL); /* sets 'uball' to Null */
 }