obj->spe usage again

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.
This commit is contained in:
PatR
2021-01-08 15:45:04 -08:00
parent 9dee1fb521
commit 85d3aa4a97
2 changed files with 4 additions and 7 deletions

View 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

View 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 */
}